Skip to content

Commit 8e0d8b6

Browse files
Wang Panzhenzhuansmb49
authored andcommitted
pinctrl: rockchip: fix restore error in resume
BugLink: https://bugs.launchpad.net/bugs/1923869 commit c971af2 upstream. The restore in resume should match to suspend which only set for RK3288 SoCs pinctrl. Fixes: 8dca933 ("pinctrl: rockchip: save and restore gpio6_c6 pinmux in suspend/resume") Reviewed-by: Jianqun Xu <jay.xu@rock-chips.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com> Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> Link: https://lore.kernel.org/r/20210223100725.269240-1-jay.xu@rock-chips.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Kamal Mostafa <kamal@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
1 parent bec0d98 commit 8e0d8b6

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

drivers/pinctrl/pinctrl-rockchip.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3386,12 +3386,15 @@ static int __maybe_unused rockchip_pinctrl_suspend(struct device *dev)
33863386
static int __maybe_unused rockchip_pinctrl_resume(struct device *dev)
33873387
{
33883388
struct rockchip_pinctrl *info = dev_get_drvdata(dev);
3389-
int ret = regmap_write(info->regmap_base, RK3288_GRF_GPIO6C_IOMUX,
3390-
rk3288_grf_gpio6c_iomux |
3391-
GPIO6C6_SEL_WRITE_ENABLE);
3389+
int ret;
33923390

3393-
if (ret)
3394-
return ret;
3391+
if (info->ctrl->type == RK3288) {
3392+
ret = regmap_write(info->regmap_base, RK3288_GRF_GPIO6C_IOMUX,
3393+
rk3288_grf_gpio6c_iomux |
3394+
GPIO6C6_SEL_WRITE_ENABLE);
3395+
if (ret)
3396+
return ret;
3397+
}
33953398

33963399
return pinctrl_force_default(info->pctl_dev);
33973400
}

0 commit comments

Comments
 (0)