]> asedeno.scripts.mit.edu Git - linux.git/commit
gpio: Handle deferred probing in of_find_gpio() properly
authorChen-Yu Tsai <wens@csie.org>
Tue, 13 Feb 2018 06:08:14 +0000 (14:08 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 27 Feb 2018 08:48:07 +0000 (09:48 +0100)
commitce27fb2c56db6ccfe8099343bb4afdab15e77e7b
tree574477fe8e4d08483407487c4b13d957ff30624a
parent6662ae6af82df10259a70c7569b4c12ea7f3ba93
gpio: Handle deferred probing in of_find_gpio() properly

of_get_named_gpiod_flags() used directly in of_find_gpio() or indirectly
through of_find_spi_gpio() or of_find_regulator_gpio() can return
-EPROBE_DEFER. This gets overwritten by the subsequent of_find_*_gpio()
calls.

This patch fixes this by trying of_find_spi_gpio() or
of_find_regulator_gpio() only if deferred probing was not requested by
the previous of_get_named_gpiod_flags() call.

Fixes: 6a537d48461d ("gpio: of: Support regulator nonstandard GPIO properties")
Fixes: c85823390215 ("gpio: of: Support SPI nonstandard GPIO properties")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
[Augmented to fit with Maxime's patch]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib-of.c