diff options
author | Hongzhou Yang <hongzhou.yang@mediatek.com> | 2015-01-27 08:13:55 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-03-18 02:02:16 +0100 |
commit | 30f010f5c4cfcdf3773d6f2dcbab3c349d05c668 (patch) | |
tree | a7762cb3f96f2fdec463de6a6ee939a9d4a892b8 /drivers/pinctrl/mediatek/pinctrl-mtk-common.c | |
parent | pinctrl: mediatek: Add EINT support to MTK pinctrl driver. (diff) | |
download | linux-30f010f5c4cfcdf3773d6f2dcbab3c349d05c668.tar.xz linux-30f010f5c4cfcdf3773d6f2dcbab3c349d05c668.zip |
arm64: mediatek: Add Pinctrl/GPIO/EINT driver for mt8173.
Add mt8173 support using mediatek common pinctrl driver.
MT8173 have a different ies_smt setting register than mt8135,
so adding this support to common code.
Signed-off-by: Hongzhou Yang <hongzhou.yang@mediatek.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/mediatek/pinctrl-mtk-common.c')
-rw-r--r-- | drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c index 7e113e12d526..2864fe333ad9 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c @@ -32,6 +32,7 @@ #include <linux/regmap.h> #include <linux/mfd/syscon.h> #include <linux/delay.h> +#include <linux/interrupt.h> #include <dt-bindings/pinctrl/mt65xx.h> #include "../core.h" @@ -111,6 +112,19 @@ static void mtk_pconf_set_ies_smt(struct mtk_pinctrl *pctl, unsigned pin, { unsigned int reg_addr, offset; unsigned int bit; + int ret; + + /* + * Due to some pins are irregular, their input enable and smt + * control register are discontinuous, but they are mapping together. + * So we need this special handle. + */ + if (pctl->devdata->spec_ies_smt_set) { + ret = pctl->devdata->spec_ies_smt_set(mtk_get_regmap(pctl, pin), + pin, pctl->devdata->port_align, value); + if (!ret) + return; + } bit = BIT(pin & 0xf); |