提交 cd4c1e65 编写于 作者: A Andrei Lalaev 提交者: Linus Walleij

pinctrl: sunxi: sunxi_pconf_set: use correct offset

Some Allwinner SoCs have 2 pinctrls (PIO and R_PIO).
Previous implementation used absolute pin numbering and it was incorrect
for R_PIO pinctrl.
It's necessary to take into account the base pin number.

Fixes: 90be64e2 ("pinctrl: sunxi: implement pin_config_set")
Signed-off-by: NAndrei Lalaev <andrey.lalaev@gmail.com>
Reviewed-by: NSamuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20220525190423.410609-1-andrey.lalaev@gmail.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 24d0af46
......@@ -544,6 +544,8 @@ static int sunxi_pconf_set(struct pinctrl_dev *pctldev, unsigned pin,
struct sunxi_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev);
int i;
pin -= pctl->desc->pin_base;
for (i = 0; i < num_configs; i++) {
enum pin_config_param param;
unsigned long flags;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册