X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=drivers%2Finput%2Ftouchscreen%2Fucb1400_ts.c;h=095f84b1f56e33769a4513a9d635aa3b0100f7f3;hb=0dd52d0df02733dfc2d5f3824e41b96492305384;hp=3a7a58222f836ed5c9aea5022a1196482c7ee355;hpb=ab3bbaa8b257845e248e9a01d12a69ca245f4197;p=karo-tx-linux.git 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) return ucb1400_adc_read(ucb->ac97, 0, adcsync); } -static inline int ucb1400_ts_pen_down(struct snd_ac97 *ac97) +static inline int ucb1400_ts_pen_up(struct snd_ac97 *ac97) { unsigned short val = ucb1400_reg_read(ac97, UCB_TS_CR); + return val & (UCB_TS_CR_TSPX_LOW | UCB_TS_CR_TSMX_LOW); } @@ -209,7 +210,7 @@ static int ucb1400_ts_thread(void *_ucb) msleep(10); - if (ucb1400_ts_pen_down(ucb->ac97)) { + if (ucb1400_ts_pen_up(ucb->ac97)) { ucb1400_ts_irq_enable(ucb->ac97); /*