summaryrefslogtreecommitdiff
path: root/include/linux/mfd/tc3589x.h
diff options
context:
space:
mode:
authordillon min <dillon.minfei@gmail.com>2020-09-03 15:30:22 +0800
committerBartosz Golaszewski <bgolaszewski@baylibre.com>2020-09-09 11:33:07 +0200
commitd284c16f84c9f8facdde25c9c077cfdcb66163d5 (patch)
tree7ddc7b42171604f52ce2f81ab65ffc95cff8fd60 /include/linux/mfd/tc3589x.h
parent805a6ef8ac28579a6fb2d8e6505c100bc9bf5395 (diff)
gpio: tc35894: Disable Direct KBD interrupts to enable gpio irq
On tc35894, have to disable direct keypad interrupts to make it as general purpose interrupts functionality work. if not, after chip reset, IRQST(0x91) will always 0x20, IRQN always low level, can't be clear. Configure DIRECTx to enable general purpose gpio mode, else read GPIOMISx register always zero in irq routine. verified on tc35894, need more test on other tc3589x. Signed-off-by: dillon min <dillon.minfei@gmail.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Diffstat (limited to 'include/linux/mfd/tc3589x.h')
-rw-r--r--include/linux/mfd/tc3589x.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/mfd/tc3589x.h b/include/linux/mfd/tc3589x.h
index bb2b19599761..b84955410e03 100644
--- a/include/linux/mfd/tc3589x.h
+++ b/include/linux/mfd/tc3589x.h
@@ -19,6 +19,9 @@ enum tx3589x_block {
#define TC3589x_RSTCTRL_KBDRST (1 << 1)
#define TC3589x_RSTCTRL_GPIRST (1 << 0)
+#define TC3589x_DKBDMSK_ELINT (1 << 1)
+#define TC3589x_DKBDMSK_EINT (1 << 0)
+
/* Keyboard Configuration Registers */
#define TC3589x_KBDSETTLE_REG 0x01
#define TC3589x_KBDBOUNCE 0x02
@@ -101,6 +104,9 @@ enum tx3589x_block {
#define TC3589x_GPIOODM2 0xE4
#define TC3589x_GPIOODE2 0xE5
+#define TC3589x_DIRECT0 0xEC
+#define TC3589x_DKBDMSK 0xF3
+
#define TC3589x_INT_GPIIRQ 0
#define TC3589x_INT_TI0IRQ 1
#define TC3589x_INT_TI1IRQ 2