aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/input/misc/ad714x.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/input/misc/ad714x.c b/drivers/input/misc/ad714x.c
index 2ceb0289a757..0f2db45f730c 100644
--- a/drivers/input/misc/ad714x.c
+++ b/drivers/input/misc/ad714x.c
@@ -158,10 +158,10 @@ static void ad714x_use_com_int(struct ad714x_chip *ad714x,
158 unsigned short data; 158 unsigned short data;
159 unsigned short mask; 159 unsigned short mask;
160 160
161 mask = ((1 << (end_stage + 1)) - 1) - (1 << start_stage); 161 mask = ((1 << (end_stage + 1)) - 1) - ((1 << start_stage) - 1);
162 162
163 ad714x->read(ad714x->dev, STG_COM_INT_EN_REG, &data); 163 ad714x->read(ad714x->dev, STG_COM_INT_EN_REG, &data);
164 data |= 1 << start_stage; 164 data |= 1 << end_stage;
165 ad714x->write(ad714x->dev, STG_COM_INT_EN_REG, data); 165 ad714x->write(ad714x->dev, STG_COM_INT_EN_REG, data);
166 166
167 ad714x->read(ad714x->dev, STG_HIGH_INT_EN_REG, &data); 167 ad714x->read(ad714x->dev, STG_HIGH_INT_EN_REG, &data);
@@ -175,10 +175,10 @@ static void ad714x_use_thr_int(struct ad714x_chip *ad714x,
175 unsigned short data; 175 unsigned short data;
176 unsigned short mask; 176 unsigned short mask;
177 177
178 mask = ((1 << (end_stage + 1)) - 1) - (1 << start_stage); 178 mask = ((1 << (end_stage + 1)) - 1) - ((1 << start_stage) - 1);
179 179
180 ad714x->read(ad714x->dev, STG_COM_INT_EN_REG, &data); 180 ad714x->read(ad714x->dev, STG_COM_INT_EN_REG, &data);
181 data &= ~(1 << start_stage); 181 data &= ~(1 << end_stage);
182 ad714x->write(ad714x->dev, STG_COM_INT_EN_REG, data); 182 ad714x->write(ad714x->dev, STG_COM_INT_EN_REG, data);
183 183
184 ad714x->read(ad714x->dev, STG_HIGH_INT_EN_REG, &data); 184 ad714x->read(ad714x->dev, STG_HIGH_INT_EN_REG, &data);