summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h
diff options
context:
space:
mode:
authorZhiyong Tao <zhiyong.tao@mediatek.com>2018-09-08 14:07:33 +0300
committerLinus Walleij <linus.walleij@linaro.org>2018-09-19 00:53:25 +0300
commit805250982bb5c5ce4a6e52e1d87204c5feea0dd1 (patch)
tree94943bc865e0b63c1b94cd0c6aede9334d1191c9 /drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h
parentb7d7f9eeca551f9cf1f6418749cd609d371faf55 (diff)
downloadlinux-805250982bb5c5ce4a6e52e1d87204c5feea0dd1.tar.xz
pinctrl: mediatek: add pinctrl-paris that implements the vendor dt-bindings
Add pinctrl-paris core that implements vendor dt-binding which MediaTek tablet, box and smartphone-based SoCs such as MT81xx, MT27xx, and MT67xx SoCs really want to depend on. The driver is just completely rewritten according to pinctrl-mtk-common.c but uses the new logic from pinctrl-mtk-common-v2.c to have an elegant way to support new SoCs in the future. Signed-off-by: Zhiyong Tao <zhiyong.tao@mediatek.com> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h')
-rw-r--r--drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h
index d5819ca98c3c..05b9b391afea 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h
@@ -174,6 +174,12 @@ struct mtk_pin_desc {
struct mtk_func_desc *funcs;
};
+struct mtk_pinctrl_group {
+ const char *name;
+ unsigned long config;
+ unsigned pin;
+};
+
struct mtk_pinctrl;
/* struct mtk_pin_soc - the structure that holds SoC-specific data */
@@ -228,6 +234,8 @@ struct mtk_pinctrl {
struct gpio_chip chip;
const struct mtk_pin_soc *soc;
struct mtk_eint *eint;
+ struct mtk_pinctrl_group *groups;
+ const char **grp_names;
};
void mtk_rmw(struct mtk_pinctrl *pctl, u8 i, u32 reg, u32 mask, u32 set);