From 665a566d5e189b61db8c58432afbfa0ab6163752 Mon Sep 17 00:00:00 2001 From: Imre Deak Date: Fri, 10 Feb 2006 17:16:32 +0200 Subject: [PATCH] ads7846: fix endianness on coordinate values MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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ä --- drivers/input/touchscreen/ads7846.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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) -- 2.41.1