Skip to content

Commit c971af2

Browse files
Wang PanzhenzhuanLinus Walleij
authored andcommitted
pinctrl: rockchip: fix restore error in resume
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>
1 parent 5d5f291 commit c971af2

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
@@ -3727,12 +3727,15 @@ static int __maybe_unused rockchip_pinctrl_suspend(struct device *dev)
37273727
static int __maybe_unused rockchip_pinctrl_resume(struct device *dev)
37283728
{
37293729
struct rockchip_pinctrl *info = dev_get_drvdata(dev);
3730-
int ret = regmap_write(info->regmap_base, RK3288_GRF_GPIO6C_IOMUX,
3731-
rk3288_grf_gpio6c_iomux |
3732-
GPIO6C6_SEL_WRITE_ENABLE);
3730+
int ret;
37333731

3734-
if (ret)
3735-
return ret;
3732+
if (info->ctrl->type == RK3288) {
3733+
ret = regmap_write(info->regmap_base, RK3288_GRF_GPIO6C_IOMUX,
3734+
rk3288_grf_gpio6c_iomux |
3735+
GPIO6C6_SEL_WRITE_ENABLE);
3736+
if (ret)
3737+
return ret;
3738+
}
37363739

37373740
return pinctrl_force_default(info->pctl_dev);
37383741
}

0 commit comments

Comments
 (0)