mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
pinctrl: sunxi: sunxi_pconf_set: use correct offset
[ Upstream commit cd4c1e65a32afd003b08ad4aafe1e4d3e4e8e61b ]
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: 90be64e276 ("pinctrl: sunxi: implement pin_config_set")
Signed-off-by: Andrei Lalaev <[email protected]>
Reviewed-by: Samuel Holland <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
12a6905369
commit
1235402750
1 changed files with 2 additions and 0 deletions
|
|
@ -536,6 +536,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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue