On 2020-02-20 09:17, Linus Walleij wrote: > On Thu, Feb 6, 2020 at 6:33 PM Russell King - ARM Linux admin > <linux@xxxxxxxxxxxxxxx> wrote: > >> It seems that sometime between 4.20 and 5.5, something has broken the >> ability to specify gpio-hogs in DT for GPIOs that are written around >> pinctrl drivers. > (explanation that makes perfect sense) >> Consequently, adding a gpio-hog to DT for this driver results in the >> driver endlessly returning -EPROBE_DEFER. > > I suspect this is sx150x-specific and suspect these two commits: > > 1a1d39e1b8dd pinctrl: sx150x: Register pinctrl before adding the gpiochip > b930151e5b55 pinctrl: sx150x: Add a static gpio/pinctrl pin range mapping > > I suppose people weren't using hogs very much with the sx150x and > it didn't turn up in testing so far. > > I don't think for example pinctrl-stmfx.c has this problem, as it registers > the pin ranges from the device tree as part of the core code. > But other drivers calling gpiochip_add_pin_range() may be experiencing > this. > > Peter/Andrey, do you have some idea? Have you tested this usecase (hogs) > with the sx150x? I have never created gpio hogs myself, so no, I haven't done any testing with that. Sorry. I could of course spend some time looking at this, but I don't know all that much about the wrinkles of the interactions between pinctrl och gpio. Or plain gpio/pinctrl for that matter. Sure, I extended this driver, but I haven't really looked at those sub-systems since. I think others will come up with a solution for this with much less effort and with less risk of introducing new problems... Cheers, Peter