summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pinctrl/mediatek/pinctrl-mtk-common.c')
-rw-r--r--drivers/pinctrl/mediatek/pinctrl-mtk-common.c14
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);