summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h
diff options
context:
space:
mode:
authorSean Wang <sean.wang@mediatek.com>2018-09-08 19:07:22 +0800
committerLinus Walleij <linus.walleij@linaro.org>2018-09-18 14:52:49 -0700
commitc28321979ba86bade51246faea13c7ce4ffb6ef5 (patch)
treedf7e204da50f37d70847a69629e2e0ae9da9538d /drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h
parent1dc5e53691596832991e6550fdbaeb1f9bd82383 (diff)
pinctrl: mediatek: add driving strength related support to pinctrl-mtk-common-v2.c
Put driving strength support related functions to pinctrl-mtk-common-v2.c as these operations might be different by chips and allow different type of driver to reuse them. Signed-off-by: Ryder.Lee <ryder.lee@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.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h
index 6041024a438f..727e5aaca52f 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h
@@ -50,6 +50,7 @@ enum {
PINCTRL_PIN_REG_E8,
PINCTRL_PIN_REG_TDSEL,
PINCTRL_PIN_REG_RDSEL,
+ PINCTRL_PIN_REG_DRV,
PINCTRL_PIN_REG_MAX,
};
@@ -130,6 +131,8 @@ struct mtk_pin_desc {
u8 drv_n;
};
+struct mtk_pinctrl;
+
/* struct mtk_pin_soc - the structure that holds SoC-specific data */
struct mtk_pin_soc {
const struct mtk_pin_reg_calc *reg_cal;
@@ -145,6 +148,12 @@ struct mtk_pin_soc {
/* Specific parameters per SoC */
u8 gpio_m;
u8 eint_m;
+
+ /* Specific pinconfig operations */
+ int (*drive_set)(struct mtk_pinctrl *hw,
+ const struct mtk_pin_desc *desc, u32 arg);
+ int (*drive_get)(struct mtk_pinctrl *hw,
+ const struct mtk_pin_desc *desc, int *val);
};
struct mtk_pinctrl {
@@ -161,4 +170,9 @@ void mtk_rmw(struct mtk_pinctrl *pctl, u32 reg, u32 mask, u32 set);
int mtk_hw_set_value(struct mtk_pinctrl *hw, int pin, int field, int value);
int mtk_hw_get_value(struct mtk_pinctrl *hw, int pin, int field, int *value);
+int mtk_pinconf_drive_set(struct mtk_pinctrl *hw,
+ const struct mtk_pin_desc *desc, u32 arg);
+int mtk_pinconf_drive_get(struct mtk_pinctrl *hw,
+ const struct mtk_pin_desc *desc, int *val);
+
#endif /* __PINCTRL_MTK_COMMON_V2_H */