Skip to content

Commit

Permalink
pinctrl: rockchip: fix restore error in resume
Browse files Browse the repository at this point in the history
commit c971af25cda94afe71617790826a86253e88eab0 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 <[email protected]>
Reviewed-by: Heiko Stuebner <[email protected]>
Signed-off-by: Wang Panzhenzhuan <[email protected]>
Signed-off-by: Jianqun Xu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Wang Panzhenzhuan authored and gregkh committed Apr 7, 2021
1 parent 54a4d8c commit 869d286
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions drivers/pinctrl/pinctrl-rockchip.c
Original file line number Diff line number Diff line change
Expand Up @@ -2367,12 +2367,15 @@ static int __maybe_unused rockchip_pinctrl_suspend(struct device *dev)
static int __maybe_unused rockchip_pinctrl_resume(struct device *dev)
{
struct rockchip_pinctrl *info = dev_get_drvdata(dev);
int ret = regmap_write(info->regmap_base, RK3288_GRF_GPIO6C_IOMUX,
rk3288_grf_gpio6c_iomux |
GPIO6C6_SEL_WRITE_ENABLE);
int ret;

if (ret)
return ret;
if (info->ctrl->type == RK3288) {
ret = regmap_write(info->regmap_base, RK3288_GRF_GPIO6C_IOMUX,
rk3288_grf_gpio6c_iomux |
GPIO6C6_SEL_WRITE_ENABLE);
if (ret)
return ret;
}

return pinctrl_force_default(info->pctl_dev);
}
Expand Down

0 comments on commit 869d286

Please sign in to comment.