diff options
author | Doug Anderson <dianders@chromium.org> | 2014-10-21 13:47:34 -0400 |
---|---|---|
committer | Heiko Stuebner <heiko@sntech.de> | 2014-10-29 16:06:28 -0400 |
commit | 0fb7dcb1b3328e2ec4958b681f2e31dfd8f004fb (patch) | |
tree | 28325645e04cf10abdb23ddf976888c2544f2711 /drivers/pinctrl | |
parent | e5c2c9db0a2cff4d4df4b94f91146b26a0f0adc7 (diff) |
pinctrl: rockchip: Parse pin groups before calling pinctrl_register()
Just like in (529301c pinctrl: samsung: Parse pin groups before
calling pinctrl_register()), Rockchip also needs to parse pin groups
earlier to make hogs work.
Signed-off-by: Doug Anderson <dianders@chromium.org>
Tested-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/pinctrl-rockchip.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c index 8a3c582108c5..6c14f6c9c455 100644 --- a/drivers/pinctrl/pinctrl-rockchip.c +++ b/drivers/pinctrl/pinctrl-rockchip.c | |||
@@ -1262,6 +1262,10 @@ static int rockchip_pinctrl_register(struct platform_device *pdev, | |||
1262 | } | 1262 | } |
1263 | } | 1263 | } |
1264 | 1264 | ||
1265 | ret = rockchip_pinctrl_parse_dt(pdev, info); | ||
1266 | if (ret) | ||
1267 | return ret; | ||
1268 | |||
1265 | info->pctl_dev = pinctrl_register(ctrldesc, &pdev->dev, info); | 1269 | info->pctl_dev = pinctrl_register(ctrldesc, &pdev->dev, info); |
1266 | if (!info->pctl_dev) { | 1270 | if (!info->pctl_dev) { |
1267 | dev_err(&pdev->dev, "could not register pinctrl driver\n"); | 1271 | dev_err(&pdev->dev, "could not register pinctrl driver\n"); |
@@ -1279,12 +1283,6 @@ static int rockchip_pinctrl_register(struct platform_device *pdev, | |||
1279 | pinctrl_add_gpio_range(info->pctl_dev, &pin_bank->grange); | 1283 | pinctrl_add_gpio_range(info->pctl_dev, &pin_bank->grange); |
1280 | } | 1284 | } |
1281 | 1285 | ||
1282 | ret = rockchip_pinctrl_parse_dt(pdev, info); | ||
1283 | if (ret) { | ||
1284 | pinctrl_unregister(info->pctl_dev); | ||
1285 | return ret; | ||
1286 | } | ||
1287 | |||
1288 | return 0; | 1286 | return 0; |
1289 | } | 1287 | } |
1290 | 1288 | ||