diff options
author | Sean Wang <sean.wang@mediatek.com> | 2018-09-08 19:07:37 +0800 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2018-09-18 14:53:37 -0700 |
commit | 89132dd8ffd2218fad3f53a9ca529e609237448a (patch) | |
tree | 937b21be21bbde3710b3933967a8e5b1cc46121e /drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h | |
parent | 29686f0151dff68e623475d449f99d8124825b17 (diff) |
pinctrl: mediatek: extend eint build to pinctrl-mtk-common-v2.c
Almost all MediaTek SoCs apply the exact same logic to build eint, so move
the common functions into pinctrl-mtk-common-v2.c to allow each new pinctrl
driver to reuse them. Also, add a protection checker on hw->soc->eint_hw to
avoid invalid memory access when there's certain SoC not to define its
eint_hw properly in the code flow.
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.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h index 05b9b391afea..e0d4e68b7cdd 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h @@ -245,6 +245,8 @@ int mtk_hw_set_value(struct mtk_pinctrl *hw, const struct mtk_pin_desc *desc, int mtk_hw_get_value(struct mtk_pinctrl *hw, const struct mtk_pin_desc *desc, int field, int *value); +int mtk_build_eint(struct mtk_pinctrl *hw, struct platform_device *pdev); + int mtk_pinconf_bias_disable_set(struct mtk_pinctrl *hw, const struct mtk_pin_desc *desc); int mtk_pinconf_bias_disable_get(struct mtk_pinctrl *hw, |