Skip to content
Commit 2cba0545 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Bartosz Golaszewski
Browse files

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: default avatarMikko Salomäki <ms@datarespons.se>
Fixes: 828546e2

 ("gpio: Add GPIO Aggregator")
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: default avatarBartosz Golaszewski <brgl@bgdev.pl>
parent 26291c54
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment