Skip to content

Commit 21c423a

Browse files
mbgglinusw
authored andcommitted
pinctrl: mediatek: fix mode encoding
Pin modes are encoded in the SoC data structure. Use that value to set IES SMT. Cc: Fabien Parent <[email protected]> Cc: Sean Wang <[email protected]> Cc: Mattijs Korpershoek <[email protected]> Cc: [email protected] Fixes: 696beef ("pinctrl: mediatek: move bit assignment") Signed-off-by: Matthias Brugger <[email protected]> Signed-off-by: Matthias Brugger <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent 884af72 commit 21c423a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/pinctrl/mediatek/pinctrl-mtk-common.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,13 @@ static int mtk_pconf_set_ies_smt(struct mtk_pinctrl *pctl, unsigned pin,
134134
pin, pctl->devdata->port_align, value, arg);
135135
}
136136

137-
bit = BIT(pin & 0xf);
138-
139137
if (arg == PIN_CONFIG_INPUT_ENABLE)
140138
offset = pctl->devdata->ies_offset;
141139
else
142140
offset = pctl->devdata->smt_offset;
143141

142+
bit = BIT(offset & pctl->devdata->mode_mask);
143+
144144
if (value)
145145
reg_addr = SET_ADDR(mtk_get_port(pctl, pin) + offset, pctl);
146146
else

0 commit comments

Comments
 (0)