pinctrl: rockchip: fix rk3568 gpio4a iomux h issue

RK3288_GRF_GPIO6C_IOMUX address is 0x64, if not jugged type RK3288;
it will set rk3568 GRF_GPIO4A_IOMUX_H reg to 0x0 after resume.
then cause gpio4 a4/5/6/7 iomux abnormal.

Fixes: 8dca933127 ("pinctrl: rockchip: save and restore gpio6_c6 pinmux in suspend/resume")
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Icb7700ff63e3cb8ca46025e6efd260d91608f23f
This commit is contained in:
Wang Panzhenzhuan
2020-12-04 17:07:31 +08:00
committed by Tao Huang
parent b1c0c4e368
commit 8086806930

View File

@@ -3923,12 +3923,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);
}