[PATCH] pinctrl: at91: fix deferred probing support

Ryan.Wanner at microchip.com Ryan.Wanner at microchip.com
Mon Nov 21 13:56:05 PST 2022


On 7/13/18 02:47, Alexandre Belloni wrote:
> Hi Rob,
> 
> On 12/07/2018 13:22:22-0600, Rob Herring wrote:
>> 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 at jcrosoft.com>
>> Cc: Linus Walleij <linus.walleij at linaro.org>
>> Cc: Nicolas Ferre <nicolas.ferre at microchip.com>
>> Cc: Alexandre Belloni <alexandre.belloni at bootlin.com>
>> Cc: linux-arm-kernel at lists.infradead.org
>> Cc: linux-gpio at vger.kernel.org
>> Signed-off-by: Rob Herring <robh at kernel.org>
>> ---
>> This is a result of trying to remove of_platform_default_populate from 
>> at91 code and relying on the DT core handling populating devices. That 
>> changed the probe order and broke booting.
>>
> 
> This solves part of the issue but when tested with the
> of_platform_default_populate removal, many drivers will fail with
> gpiod_set_value: invalid GPIO (errorpointer)
> 
> or 
> 
> gpiod_get_value: invalid GPIO (errorpointer)
> 
> This happens both before and after the pinctrl driver probed.
> 
> I didn't investigate much yet.
> 
I applied this patch as well as of_platform_default_populate removal patch
on v6.1.0-rc6 with the at91-sam9x60-ek I did not experience the issues that
are mentioned on this thread or 
ARM: at91: remove unnecessary of_platform_default_populate calls, thread.

Has this been fixed since 2018?

Best, 
Ryan


More information about the linux-arm-kernel mailing list