Skip to content

Commit e46df23

Browse files
moore-broslinusw
authored andcommitted
pinctrl: mediatek: refactor EINT related code for all MediaTek pinctrl can fit
This patch is in preparation for adding EINT support to MT7622 pinctrl, and the refactoring doesn't alter any existent logic. A reason we have to refactor EINT code pieces into a generic way is that currently, they're tightly coupled with a certain type of MediaTek pinctrl would cause a grown in a very bad way as there is different types of pinctrl devices getting to join. Therefore, it is an essential or urgent thing that EINT code pieces are refactored to eliminate any dependencies across GPIO and EINT as possible. Additional structure mtk_eint_[xt, hw, regs] are being introduced for indicating how maps being designed between GPIO and EINT hw number, how to set and get GPIO state for a certain EINT pin, what characteristic on a EINT device is present on various SoCs. Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent 6ee6fbd commit e46df23

File tree

11 files changed

+756
-527
lines changed

11 files changed

+756
-527
lines changed

drivers/pinctrl/mediatek/Kconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
menu "MediaTek pinctrl drivers"
22
depends on ARCH_MEDIATEK || COMPILE_TEST
33

4+
config EINT_MTK
5+
bool "MediaTek External Interrupt Support"
6+
depends on PINCTRL_MTK || COMPILE_TEST
7+
select IRQ_DOMAIN
8+
49
config PINCTRL_MTK
510
bool
611
depends on OF
712
select PINMUX
813
select GENERIC_PINCONF
914
select GPIOLIB
15+
select EINT_MTK
1016
select OF_GPIO
1117

1218
# For ARMv7 SoCs

drivers/pinctrl/mediatek/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# SPDX-License-Identifier: GPL-2.0
22
# Core
3+
obj-$(CONFIG_EINT_MTK) += mtk-eint.o
34
obj-$(CONFIG_PINCTRL_MTK) += pinctrl-mtk-common.o
45

56
# SoC Drivers

0 commit comments

Comments
 (0)