From: Imre Deak Date: Fri, 10 Feb 2006 15:16:32 +0000 (+0200) Subject: ads7846: fix endianness on coordinate values X-Git-Tag: v2.6.16-omap1~69 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=665a566d5e189b61db8c58432afbfa0ab6163752;p=linux-2.6-omap-h63xx.git ads7846: fix endianness on coordinate values 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 Signed-off-by: Juha Yrjölä --- diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index c3357670156..54462cc1e50 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -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)