diff options
| author | Tony Lindgren <[email protected]> | 2017-03-30 09:16:39 -0700 |
|---|---|---|
| committer | Linus Walleij <[email protected]> | 2017-04-07 01:08:08 +0200 |
| commit | 6118714275f0a313ecc296a87ed1af32d9691bed (patch) | |
| tree | 5c670dc8d1ce0c5623094c5811ff9ab083a3ca3f /include/linux | |
| parent | a71c9a1c779f2499fb2afc0553e543f18aff6edf (diff) | |
pinctrl: core: Fix pinctrl_register_and_init() with pinctrl_enable()
Recent pinctrl changes to allow dynamic allocation of pins exposed one
more issue with the pinctrl pins claimed early by the controller itself.
This caused a regression for IMX6 pinctrl hogs.
Before enabling the pin controller driver we need to wait until it has
been properly initialized, then claim the hogs, and only then enable it.
To fix the regression, split the code into pinctrl_claim_hogs() and
pinctrl_enable(). And then let's require that pinctrl_enable() is always
called by the pin controller driver when ready after calling
pinctrl_register_and_init().
Depends-on: 950b0d91dc10 ("pinctrl: core: Fix regression caused by delayed
work for hogs")
Fixes: df61b366af26 ("pinctrl: core: Use delayed work for hogs")
Fixes: e566fc11ea76 ("pinctrl: imx: use generic pinctrl helpers for
managing groups")
Cc: Haojian Zhuang <[email protected]>
Cc: Masahiro Yamada <[email protected]>
Cc: Mika Penttilä <[email protected]>
Cc: Mika Westerberg <[email protected]>
Cc: Nishanth Menon <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: Stefan Agner <[email protected]>
Tested-by: Geert Uytterhoeven <[email protected]>
Tested-by: Gary Bisson <[email protected]>
Tested-by: Fabio Estevam <[email protected]>
Signed-off-by: Tony Lindgren <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/pinctrl/pinctrl.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/pinctrl/pinctrl.h b/include/linux/pinctrl/pinctrl.h index 8ce2d87a238b..5e45385c5bdc 100644 --- a/include/linux/pinctrl/pinctrl.h +++ b/include/linux/pinctrl/pinctrl.h @@ -145,8 +145,9 @@ struct pinctrl_desc { extern int pinctrl_register_and_init(struct pinctrl_desc *pctldesc, struct device *dev, void *driver_data, struct pinctrl_dev **pctldev); +extern int pinctrl_enable(struct pinctrl_dev *pctldev); -/* Please use pinctrl_register_and_init() instead */ +/* Please use pinctrl_register_and_init() and pinctrl_enable() instead */ extern struct pinctrl_dev *pinctrl_register(struct pinctrl_desc *pctldesc, struct device *dev, void *driver_data); |