Skip to content

Commit fa917d3

Browse files
laeyraudlinusw
authored andcommitted
pinctrl: mediatek: mt8189: restore previous register base name array order
In mt8189-pinctrl driver, a previous commit changed the register base name array (mt8189_pinctrl_register_base_names) entry name and order to align it with the same name and order as the "mediatek,mt8189-pinctrl" devicetree bindings. The new order (by ascending register address) now causes an issue with MT8189 pinctrl configuration. MT8189 SoC has multiple base addresses for the pin configuration registers. Several constant data structures, declaring each pin configuration, are using PIN_FIELD_BASE() macro which i_base parameter indicates for a given pin the lookup index in the base register address array of the driver internal data for the configuration register read/write accesses. But in practice, this parameter is given a hardcoded numerical value that corresponds to the expected base register entry index in mt8189_pinctrl_register_base_names array. Since this array reordering, the i_base index matching is no more correct. So, in order to avoid modifying over a thousand of PIN_FIELD_BASE() calls, restore previous mt8189_pinctrl_register_base_names entry order. Fixes: 5189192 ("pinctrl: mediatek: mt8189: align register base names to dt-bindings ones") Signed-off-by: Louis-Alexis Eyraud <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
1 parent 8f0b4cc commit fa917d3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/pinctrl/mediatek/pinctrl-mt8189.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1642,7 +1642,7 @@ static const struct mtk_pin_reg_calc mt8189_reg_cals[PINCTRL_PIN_REG_MAX] = {
16421642
};
16431643

16441644
static const char * const mt8189_pinctrl_register_base_names[] = {
1645-
"base", "lm", "rb0", "rb1", "bm0", "bm1", "bm2", "lt0", "lt1", "rt",
1645+
"base", "bm0", "bm1", "bm2", "lm", "lt0", "lt1", "rb0", "rb1", "rt",
16461646
};
16471647

16481648
static const struct mtk_eint_hw mt8189_eint_hw = {

0 commit comments

Comments
 (0)