diff options
author | Fabien Parent <fparent@baylibre.com> | 2021-05-19 18:24:07 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2021-05-27 16:50:15 +0200 |
commit | 9f940d8ecf921d2638b05da60eec0d25459be170 (patch) | |
tree | d5727bb1aec83e65b6f3df18cb3733d32693fcbd /drivers/pinctrl/mediatek/pinctrl-mt8135.c | |
parent | dt-bindings: pinctrl: mt65xx: add mt8365 SoC binding (diff) | |
download | linux-9f940d8ecf921d2638b05da60eec0d25459be170.tar.xz linux-9f940d8ecf921d2638b05da60eec0d25459be170.zip |
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-mt8135.c')
-rw-r--r-- | drivers/pinctrl/mediatek/pinctrl-mt8135.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pinctrl/mediatek/pinctrl-mt8135.c b/drivers/pinctrl/mediatek/pinctrl-mt8135.c index 9ac784c48873..b8f4080aab45 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mt8135.c +++ b/drivers/pinctrl/mediatek/pinctrl-mt8135.c @@ -305,6 +305,9 @@ static const struct mtk_pinctrl_devdata mt8135_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 = 7, .ports = 6, |