diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2020-02-20 16:01:49 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2020-02-21 19:10:33 +0300 |
commit | 63636d956c455c0fbe2118078a03f563ddd6bf6e (patch) | |
tree | c84d484227fdb545f3d82646c2f7f296fa3049bc /drivers/gpio/gpiolib-of.h | |
parent | bc21077e084b80c22072a40d32beb24ea33938ec (diff) | |
download | linux-63636d956c455c0fbe2118078a03f563ddd6bf6e.tar.xz |
gpio: of: Add DT overlay support for GPIO hogs
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@glider.be>
Link: https://lore.kernel.org/r/20200220130149.26283-3-geert+renesas@glider.be
Reviewed-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpiolib-of.h')
-rw-r--r-- | drivers/gpio/gpiolib-of.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpio/gpiolib-of.h b/drivers/gpio/gpiolib-of.h index 9768831b1fe2..ed26664f1537 100644 --- a/drivers/gpio/gpiolib-of.h +++ b/drivers/gpio/gpiolib-of.h @@ -35,4 +35,6 @@ static inline bool of_gpio_need_valid_mask(const struct gpio_chip *gc) } #endif /* CONFIG_OF_GPIO */ +extern struct notifier_block gpio_of_notifier; + #endif /* GPIOLIB_OF_H */ |