gpiolib: provide gpiod_remove_hogs()
authorBartosz Golaszewski <brgl@bgdev.pl>
Tue, 7 Dec 2021 09:34:06 +0000 (10:34 +0100)
committerBartosz Golaszewski <brgl@bgdev.pl>
Fri, 17 Dec 2021 11:26:12 +0000 (12:26 +0100)
commitdd61b29207ca4f346fbd9c06bc49f093e3369185
tree14d2b0638a5ba9fac724f638379d4172c0ffe366
parentab39d6988dd53f354130438d8afa5596a2440fed
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>
drivers/gpio/gpiolib.c
include/linux/gpio/machine.h