[PATCH RFC] gpio: Fix probing of gpio-hogs
Chris Webb
chris at arachsys.com
Wed Jul 31 12:14:34 CEST 2024
Hi Simon,
Simon Glass <sjg at chromium.org> wrote:
>> Presumably it needs to apply to every mtk soc that uses
>> mtk_pinctrl_common_probe() as they'll all be affected by this problem.
>
> Yes I suppose so.
As well as the mediatek case (patch just sent), I thought I should look
through the other pinctrl drivers for other examples of this problem you
explained to me.
Both starfive/pinctrl-starfive.c and mvebu/pinctrl-armada-37xx.c do the
same thing, calling their gpiochip_register as part of the driver probe
method. The pinctrl-armada-37xx.c driver also has a bind action:
static int armada_37xx_pinctrl_bind(struct udevice *dev)
{
/*
* Make sure that the pinctrl driver gets probed after binding
* as on A37XX the pinctrl driver is the one that is also
* registering the GPIO one during probe, so if its not probed
* GPIO-s are not registered as well.
*/
dev_or_flags(dev, DM_FLAG_PROBE_AFTER_BIND);
return 0;
}
which presumably wouldn't be needed if the gpiochip were bound at pinctrl
bind time instead of pinctrl probe time?
Alas I don't have any boards to test on for either of these platforms.
Best wishes,
Chris.
More information about the U-Boot
mailing list