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

From: Tony Lindgren
Date: Mon Feb 27 2017 - 17:35:20 EST


* 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().

Regards,

Tony

8< ---------------------------