]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ads7846: fix endianness on coordinate values
authorImre Deak <imre.deak@nokia.com>
Fri, 10 Feb 2006 15:16:32 +0000 (17:16 +0200)
committerJuha Yrjola <juha.yrjola@nokia.com>
Fri, 10 Feb 2006 15:16:32 +0000 (17:16 +0200)
Remove conversion from Big Endian to CPU order in the ads7846 driver.
We expect the uWire SPI driver to do this for us. Also the shift on read
values should be only 3, since we have a dummy clock at the beginning.

Signed-off-by: Imre Deak <imre.deak@nokia.com>
Signed-off-by: Juha Yrjölä <juha.yrjola@nokia.com>
drivers/input/touchscreen/ads7846.c

index c3357670156b7e3f37732a3ff408ec8bbd0d6e83..54462cc1e5048df473202d7cb36b321ecfd4e924 100644 (file)
@@ -257,10 +257,10 @@ static void ads7846_rx(void *ads)
        /* adjust:  12 bit samples (left aligned), built from
         * two 8 bit values writen msb-first.
         */
-       x = be16_to_cpu(ts->tc.x) >> 4;
-       y = be16_to_cpu(ts->tc.y) >> 4;
-       z1 = be16_to_cpu(ts->tc.z1) >> 4;
-       z2 = be16_to_cpu(ts->tc.z2) >> 4;
+       x = ts->tc.x >> 3;
+       y = ts->tc.y >> 3;
+       z1 = ts->tc.z1 >> 3;
+       z2 = ts->tc.z2 >> 3;
 
        /* range filtering */
        if (x == MAX_12BIT)