diff options
author | Fabien Parent <fparent@baylibre.com> | 2021-05-19 19:24:07 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2021-05-27 17:50:15 +0300 |
commit | 9f940d8ecf921d2638b05da60eec0d25459be170 (patch) | |
tree | d5727bb1aec83e65b6f3df18cb3733d32693fcbd /drivers/pinctrl/mediatek/pinctrl-mt2712.c | |
parent | 8b4c397d88d97d4fd9c3f3527aa66688b1a3387a (diff) | |
download | linux-9f940d8ecf921d2638b05da60eec0d25459be170.tar.xz |
pinctrl: mediatek: don't hardcode mode encoding in common code
MT8365 encode the pins mode differently than other
MTK pinctrl drivers that use the PINCTRL_MTK common code.
Add 3 new fields in mtk_pinctrl_devdata in order to store how
pin modes are encoded into the register. At the
same time update all the pinctrl driver that depends on
CONFIG_PINCTRL_MTK.
Signed-off-by: Fabien Parent <fparent@baylibre.com>
Link: https://lore.kernel.org/r/20210519162409.3755679-2-fparent@baylibre.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/mediatek/pinctrl-mt2712.c')
-rw-r--r-- | drivers/pinctrl/mediatek/pinctrl-mt2712.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pinctrl/mediatek/pinctrl-mt2712.c b/drivers/pinctrl/mediatek/pinctrl-mt2712.c index 8398d55c01cb..ba35fc6cc138 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mt2712.c +++ b/drivers/pinctrl/mediatek/pinctrl-mt2712.c @@ -576,6 +576,9 @@ static const struct mtk_pinctrl_devdata mt2712_pinctrl_data = { .port_shf = 4, .port_mask = 0xf, .port_align = 4, + .mode_mask = 0xf, + .mode_per_reg = 5, + .mode_shf = 4, .eint_hw = { .port_mask = 0xf, .ports = 8, |