aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrice Chotard <patrice.chotard@st.com>2016-08-10 03:39:10 -0400
committerLee Jones <lee.jones@linaro.org>2016-08-10 04:24:29 -0400
commitc16bee7897bffc3814390c9279bf01137a6bd595 (patch)
tree640def458118430c595f94eaaead76564bd65dc1
parent6936e1f88d233444ac8010d9b6bfaac3ba698ee2 (diff)
mfd: stmpe: Use generic bit mask name
In order to prepare the ground to STMPE1600, as STMPE1600's SYS_CTRL register has the same layout as STMPE801 variant, unify STMPExxx_REG_SYS_CTRL_RESET/INT_EN/INT_HI bit masks to more generic STMPE_SYS_CTRL_RESET/INT_EN/INT_HI Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r--drivers/mfd/stmpe.c4
-rw-r--r--drivers/mfd/stmpe.h6
2 files changed, 4 insertions, 6 deletions
diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
index 85005253663d..a0704767a050 100644
--- a/drivers/mfd/stmpe.c
+++ b/drivers/mfd/stmpe.c
@@ -1110,7 +1110,7 @@ static int stmpe_chip_init(struct stmpe *stmpe)
1110 1110
1111 if (stmpe->irq >= 0) { 1111 if (stmpe->irq >= 0) {
1112 if (id == STMPE801_ID) 1112 if (id == STMPE801_ID)
1113 icr = STMPE801_REG_SYS_CTRL_INT_EN; 1113 icr = STMPE_SYS_CTRL_INT_EN;
1114 else 1114 else
1115 icr = STMPE_ICR_LSB_GIM; 1115 icr = STMPE_ICR_LSB_GIM;
1116 1116
@@ -1124,7 +1124,7 @@ static int stmpe_chip_init(struct stmpe *stmpe)
1124 if (irq_trigger == IRQF_TRIGGER_RISING || 1124 if (irq_trigger == IRQF_TRIGGER_RISING ||
1125 irq_trigger == IRQF_TRIGGER_HIGH) { 1125 irq_trigger == IRQF_TRIGGER_HIGH) {
1126 if (id == STMPE801_ID) 1126 if (id == STMPE801_ID)
1127 icr |= STMPE801_REG_SYS_CTRL_INT_HI; 1127 icr |= STMPE_SYS_CTRL_INT_HI;
1128 else 1128 else
1129 icr |= STMPE_ICR_LSB_HIGH; 1129 icr |= STMPE_ICR_LSB_HIGH;
1130 } 1130 }
diff --git a/drivers/mfd/stmpe.h b/drivers/mfd/stmpe.h
index 4ae343de71eb..4ba112362167 100644
--- a/drivers/mfd/stmpe.h
+++ b/drivers/mfd/stmpe.h
@@ -105,6 +105,8 @@ int stmpe_remove(struct stmpe *stmpe);
105#define STMPE_ICR_LSB_GIM (1 << 0) 105#define STMPE_ICR_LSB_GIM (1 << 0)
106 106
107#define STMPE_SYS_CTRL_RESET (1 << 7) 107#define STMPE_SYS_CTRL_RESET (1 << 7)
108#define STMPE_SYS_CTRL_INT_EN (1 << 2)
109#define STMPE_SYS_CTRL_INT_HI (1 << 0)
108 110
109/* 111/*
110 * STMPE801 112 * STMPE801
@@ -121,10 +123,6 @@ int stmpe_remove(struct stmpe *stmpe);
121#define STMPE801_REG_GPIO_SET_PIN 0x11 123#define STMPE801_REG_GPIO_SET_PIN 0x11
122#define STMPE801_REG_GPIO_DIR 0x12 124#define STMPE801_REG_GPIO_DIR 0x12
123 125
124#define STMPE801_REG_SYS_CTRL_RESET (1 << 7)
125#define STMPE801_REG_SYS_CTRL_INT_EN (1 << 2)
126#define STMPE801_REG_SYS_CTRL_INT_HI (1 << 0)
127
128/* 126/*
129 * STMPE811 127 * STMPE811
130 */ 128 */