Geert Uytterhoeven 2cba05451a gpio: aggregator: Fix calling into sleeping GPIO controllers
If the parent GPIO controller is a sleeping controller (e.g. a GPIO
controller connected to I2C), getting or setting a GPIO triggers a
might_sleep() warning.  This happens because the GPIO Aggregator takes
the can_sleep flag into account only for its internal locking, not for
calling into the parent GPIO controller.

Fix this by using the gpiod_[gs]et*_cansleep() APIs when calling into a
sleeping GPIO controller.

Reported-by: Mikko Salomäki <ms@datarespons.se>
Fixes: 828546e24280f721 ("gpio: Add GPIO Aggregator")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-02-02 11:53:46 +01:00
..
2022-01-11 12:31:35 -08:00
2021-04-14 10:19:22 +01:00
2021-05-05 16:07:41 +02:00
2021-11-08 11:55:21 -08:00
2021-12-13 13:29:09 +02:00
2020-12-09 15:17:24 +01:00
2021-08-29 21:19:50 +02:00
2021-11-08 11:55:21 -08:00
2022-01-14 18:50:52 -05:00
2020-12-09 15:17:24 +01:00
2022-01-11 12:31:35 -08:00
2022-01-11 12:31:35 -08:00