]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH 1/6] Revert "ads7846: filtering based on pressure value"
authorImre Deak <imre.deak@nokia.com>
Mon, 15 May 2006 07:33:08 +0000 (00:33 -0700)
committerTony Lindgren <tony@atomide.com>
Mon, 15 May 2006 07:33:08 +0000 (00:33 -0700)
This reverts 0bd6f714d5b86d58659ba184507b86f1f67cf802 commit.

An upcoming patch solves this better by ignoring the whole sample.

Signed-off-by: Imre Deak <imre.deak@nokia.com>
drivers/input/touchscreen/ads7846.c

index e1f94fb4518af0e6b1cbcfcedae3c8871e69105c..42ee2ca53c7dca31f977f57e9e5f9ac9de2260e5 100644 (file)
@@ -79,14 +79,10 @@ struct ads7846 {
        u16                     model;
        u16                     vref_delay_usecs;
        u16                     x_plate_ohms;
-       u16                     pressure_max;
 
        u8                      read_x, read_y, read_z1, read_z2, pwrdown;
        u16                     dummy;          /* for the pwrdown read */
        struct ts_event         tc;
-       u16                     last_x;
-       u16                     last_y;
-       u16                     last_pressure;
 
        struct spi_transfer     xfer[10];
        struct spi_message      msg[5];
@@ -399,18 +395,6 @@ static void ads7846_rx(void *ads)
        } else
                Rt = 0;
 
-       if (Rt > ts->pressure_max) {
-               if (ts->last_pressure) {
-                       x = ts->last_x;
-                       y = ts->last_y;
-               }
-               Rt = ts->pressure_max;
-       }
-
-       ts->last_x = x;
-       ts->last_y = y;
-       ts->last_pressure = Rt;
-
        /* NOTE:  "pendown" is inferred from pressure; we don't rely on
         * being able to check nPENIRQ status, or "friendly" trigger modes
         * (both-edges is much better than just-falling or low-level).
@@ -664,7 +648,6 @@ static int __devinit ads7846_probe(struct spi_device *spi)
        ts->model = pdata->model ? : 7846;
        ts->vref_delay_usecs = pdata->vref_delay_usecs ? : 100;
        ts->x_plate_ohms = pdata->x_plate_ohms ? : 400;
-       ts->pressure_max = pdata->pressure_max ? : ~0;
        ts->debounce_max = pdata->debounce_max ? : 1;
        ts->debounce_tol = pdata->debounce_tol ? : 10;