]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: defer probe if pinctrl cannot be found
authorTomeu Vizoso <tomeu.vizoso@collabora.com>
Tue, 14 Jul 2015 08:29:54 +0000 (10:29 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 28 Jul 2015 11:55:36 +0000 (13:55 +0200)
commiteab034a75d017eb7a5675c621d94d54a62839b5e
treed2f124df65cc05d337ddf3958c6263c021c3eb2a
parent6fc855b24925c65d5bec2cbf7c2ce475213d92ae
gpio: defer probe if pinctrl cannot be found

When an OF node has a pin range for its GPIOs, return -EPROBE_DEFER if
the pin controller isn't available.

Otherwise, the GPIO range wouldn't be set at all unless the pin
controller probed always before the GPIO chip.

With this change, the probe of the GPIO chip will be deferred and will
be retried at a later point, hopefully once the pin controller has been
registered and probed already.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib-of.c
drivers/gpio/gpiolib.c
include/linux/of_gpio.h