]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/input/touchscreen/ucb1400_ts.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[karo-tx-linux.git] / drivers / input / touchscreen / ucb1400_ts.c
index 3a7a58222f836ed5c9aea5022a1196482c7ee355..095f84b1f56e33769a4513a9d635aa3b0100f7f3 100644 (file)
@@ -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);
 
                        /*