[PATCH RFC] gpio: Fix probing of gpio-hogs

Chris Webb chris at arachsys.com
Wed Jul 3 11:49:17 CEST 2024


Chris Webb <chris at arachsys.com> wrote:

> Tom Rini <trini at konsulko.com> wrote:
>
>> Adding Marek, as the author of commit 48b3ecbedf82 ("gpio: Get rid of
>> gpio_hog_probe_all()").
>
> Thanks! I don't claim this is the correct way to fix this, just that it  
> works.
>
> Specifically, the two things I found that got gpio-hog working were
>
>   (a) adding an explicit probe instead of DM_FLAG_PROBE_AFTER_BIND in gpio_post_bind(), or
>
>   (b) adding a .bind function in U_BOOT_DRIVER(mt7981_pinctrl) like
>
>     static int mtk_pinctrl_mt7981_bind(struct udevice *dev)
>     {
>     	dev_or_flags(dev, DM_FLAG_PROBE_AFTER_BIND);
>     	return 0;
>     }
>
> However, presumably (b) isn't right as it would (presumably) need  
> repeating in lots of other pinctrl drivers?

Now the release is out, I'd be really keen to pick this one up and get it  
fixed upstream if possible.

The device I originally discovered this on is now deployed, but I could  
probably grab it back for a bit and resolder a serial console onto it for  
further testing if neither of the above is correct and a third alternative  
I didn't try needs confirming on real hardware.

Best wishes,

Chris.


More information about the U-Boot mailing list