aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/ucb1400_ts.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/touchscreen/ucb1400_ts.c')
-rw-r--r--drivers/input/touchscreen/ucb1400_ts.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/input/touchscreen/ucb1400_ts.c b/drivers/input/touchscreen/ucb1400_ts.c
index 3a7a58222f83..095f84b1f56e 100644
--- a/drivers/input/touchscreen/ucb1400_ts.c
+++ b/drivers/input/touchscreen/ucb1400_ts.c
@@ -128,9 +128,10 @@ static inline unsigned int ucb1400_ts_read_yres(struct ucb1400_ts *ucb)
128 return ucb1400_adc_read(ucb->ac97, 0, adcsync); 128 return ucb1400_adc_read(ucb->ac97, 0, adcsync);
129} 129}
130 130
131static inline int ucb1400_ts_pen_down(struct snd_ac97 *ac97) 131static inline int ucb1400_ts_pen_up(struct snd_ac97 *ac97)
132{ 132{
133 unsigned short val = ucb1400_reg_read(ac97, UCB_TS_CR); 133 unsigned short val = ucb1400_reg_read(ac97, UCB_TS_CR);
134
134 return val & (UCB_TS_CR_TSPX_LOW | UCB_TS_CR_TSMX_LOW); 135 return val & (UCB_TS_CR_TSPX_LOW | UCB_TS_CR_TSMX_LOW);
135} 136}
136 137
@@ -209,7 +210,7 @@ static int ucb1400_ts_thread(void *_ucb)
209 210
210 msleep(10); 211 msleep(10);
211 212
212 if (ucb1400_ts_pen_down(ucb->ac97)) { 213 if (ucb1400_ts_pen_up(ucb->ac97)) {
213 ucb1400_ts_irq_enable(ucb->ac97); 214 ucb1400_ts_irq_enable(ucb->ac97);
214 215
215 /* 216 /*