Re: [PATCH v2 2/2] gpio: of: Add DT overlay support for GPIO hogs
From: Linus Walleij
Date: Fri Feb 21 2020 - 11:10:40 EST
On Thu, Feb 20, 2020 at 2:01 PM Geert Uytterhoeven
<geert+renesas@xxxxxxxxx> wrote:
> As GPIO hogs are configured at GPIO controller initialization time,
> adding/removing GPIO hogs in DT overlays does not work.
>
> Add support for GPIO hogs described in DT overlays by registering an OF
> reconfiguration notifier, to handle the addition and removal of GPIO hog
> subnodes to/from a GPIO controller device node.
>
> Note that when a GPIO hog device node is being removed, its "gpios"
> properties is no longer available, so we have to keep track of which
> node a hog belongs to, which is done by adding a pointer to the hog's
> device node to struct gpio_desc.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> ---
> v2:
> - Drop RFC state,
> - Document that modifying existing gpio-hog nodes is not supported.
Clean and well separated code, patch applied
with Frank's review tag!
Yours,
Linus Walleij