diff options
author | 2021-12-07 10:34:06 +0100 | |
---|---|---|
committer | 2021-12-17 12:26:12 +0100 | |
commit | dd61b29207ca4f346fbd9c06bc49f093e3369185 (patch) | |
tree | 14d2b0638a5ba9fac724f638379d4172c0ffe366 /include/linux/gpio | |
parent | gpio: aspeed-sgpio: Convert aspeed_sgpio.lock to raw_spinlock (diff) | |
download | linux-dd61b29207ca4f346fbd9c06bc49f093e3369185.tar.gz linux-dd61b29207ca4f346fbd9c06bc49f093e3369185.tar.bz2 linux-dd61b29207ca4f346fbd9c06bc49f093e3369185.zip |
gpiolib: provide gpiod_remove_hogs()
Currently all users of gpiod_add_hogs() call it only once at system
init so there never was any need for a mechanism allowing to remove
them. Now the upcoming gpio-sim will need to tear down chips with hogged
lines so provide a function that allows to remove hogs.
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/gpio')
-rw-r--r-- | include/linux/gpio/machine.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/gpio/machine.h b/include/linux/gpio/machine.h index d755e529c1e3..2647dd10b541 100644 --- a/include/linux/gpio/machine.h +++ b/include/linux/gpio/machine.h @@ -100,6 +100,7 @@ void gpiod_add_lookup_table(struct gpiod_lookup_table *table); void gpiod_add_lookup_tables(struct gpiod_lookup_table **tables, size_t n); void gpiod_remove_lookup_table(struct gpiod_lookup_table *table); void gpiod_add_hogs(struct gpiod_hog *hogs); +void gpiod_remove_hogs(struct gpiod_hog *hogs); #else /* ! CONFIG_GPIOLIB */ static inline void gpiod_add_lookup_table(struct gpiod_lookup_table *table) {} @@ -108,6 +109,7 @@ void gpiod_add_lookup_tables(struct gpiod_lookup_table **tables, size_t n) {} static inline void gpiod_remove_lookup_table(struct gpiod_lookup_table *table) {} static inline void gpiod_add_hogs(struct gpiod_hog *hogs) {} +static inline void gpiod_remove_hogs(struct gpiod_hog *hogs) {} #endif /* CONFIG_GPIOLIB */ #endif /* __LINUX_GPIO_MACHINE_H */ |