pinctrl: at91: fix deferred probing support
authorRob Herring <robh@kernel.org>
Thu, 12 Jul 2018 19:22:22 +0000 (13:22 -0600)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 27 Jan 2023 12:48:07 +0000 (13:48 +0100)
commit91da7032d86a2aa2ae4b43d82008282bb672f9f2
treec43f65a220d9f9b1355688e4ac8ab88f3e0927c2
parent6c488fbb1de2bf3821307f4a81449d7b2f300b34
pinctrl: at91: fix deferred probing support

AT91 pinctrl deferred probing support is broken if the GPIO devices
haven't probed first and set gpio_banks to non-zero. The later condition
that only some GPIO devices haven't probed can't actually happen as
either all the GPIO devices have probed first or none of them have. Plus
the pinctrl driver has already returned -EINVAL, so it's not on the
deferred list to retry probing.

Fix this by consolidating the checking that all GPIO devices are probed.

Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Tested-by: Nicolas Ferre <nicolas.ferre@microchip.com> # on sama5d3 xplained
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20180712192222.32481-1-robh@kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-at91.c