Skip to content
Commit ce27fb2c authored by Chen-Yu Tsai's avatar Chen-Yu Tsai Committed by Linus Walleij
Browse files

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: 6a537d48 ("gpio: of: Support regulator nonstandard GPIO properties")
Fixes: c8582339 ("gpio: of: Support SPI nonstandard GPIO properties")
Signed-off-by: default avatarChen-Yu Tsai <wens@csie.org>
[Augmented to fit with Maxime's patch]
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 6662ae6a
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