mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
pinctrl: rockchip: fix pinmux reset in rockchip_pmx_set
[ Upstream commit4ea4d4808e
] rockchip_pmx_set reset all pinmuxs in group to 0 in the case of error, add missing bank data retrieval in that code to avoid setting mux on unexpected pins. Fixes:14797189b3
("pinctrl: rockchip: add return value to rockchip_set_mux") Reviewed-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Huang-Huang Bao <i@eh5.me> Link: https://lore.kernel.org/r/20240606125755.53778-5-i@eh5.me Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
18acf67d3c
commit
df9409bb0e
@ -2235,8 +2235,10 @@ static int rockchip_pmx_set(struct pinctrl_dev *pctldev, unsigned selector,
|
||||
|
||||
if (ret) {
|
||||
/* revert the already done pin settings */
|
||||
for (cnt--; cnt >= 0; cnt--)
|
||||
for (cnt--; cnt >= 0; cnt--) {
|
||||
bank = pin_to_bank(info, pins[cnt]);
|
||||
rockchip_set_mux(bank, pins[cnt] - bank->pin_base, 0);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user