Re: [REGRESSION] pinctrl, of, unable to find hogs

From: Gary Bisson
Date: Mon Feb 27 2017 - 17:20:26 EST


Hi Tony,

On Mon, Feb 27, 2017 at 10:45:35AM -0800, Tony Lindgren wrote:
> * Tony Lindgren <tony@xxxxxxxxxxx> [170227 09:37]:
> > * Gary Bisson <gary.bisson@xxxxxxxxxxxxxxxxxxx> [170227 08:42]:
> > > > Not sure how to fix it though since we can't move the dt probing before
> > > > radix tree init.
> >
> > Yup looks like we still have an issue with pinctrl driver functions
> > getting called before driver probe has completed.
> >
> > How about we introduce something like:
> >
> > int pinctrl_claim_hogs(struct pinctrl_dev *pctldev);
> >
> > Then the drivers can call that at the end of the probe after
> > the pins have been parsed?
> >
> > This should be safe as no other driver can claim the pins either
> > before the pins have been parsed :)
>
> Below is an initial take on this solution. I've only briefly tested
> it so far but maybe give it a try and see if it helps.
>
> I'll take a look if we can make the error handling better for
> pinctrl_register_and_init().

I'll try that tomorrow morning and let you know.

Regards,
Gary