pinctrl: mediatek: rewrite mtk_pinconf_set and related functions
authorSam Shih <sam.shih@mediatek.com>
Thu, 21 Apr 2022 06:23:51 +0000 (14:23 +0800)
committerTom Rini <trini@konsulko.com>
Thu, 5 May 2022 13:29:57 +0000 (09:29 -0400)
commitdafe0fbfb0f37e2d3be3e25a60975e1eb31ef8b7
tree4def1d48ec6f5af3c4d0bd24e6516b6b3b3a48d4
parentccf24a9d7739241c08e17b45d7fbe74b9baa3dcc
pinctrl: mediatek: rewrite mtk_pinconf_set and related functions

There are many pins in a SoCs, and different pin may belong
to different "io_type", For example: some pins of MT7622 belongs
to "io_type A", the other belongs to "io_type B", and pinctrl "V0"
means handle pinconf via "io_type A" or "io_type B", so SoCs that
contain "io_type A" and "io_type B" pins, use "V0" in pinctrl driver.

This patch separates the implementation of register operations
(e.g: "bias-pull-up/down", "driving" and "input-enable") into
different functions, and lets the original V0/V1
ops to call the new functions.

Signed-off-by: Sam Shih <sam.shih@mediatek.com>
drivers/pinctrl/mediatek/pinctrl-mtk-common.c
drivers/pinctrl/mediatek/pinctrl-mtk-common.h