[patch 2.6.20-rc1 5/6] input: ads7846 forces SPI mode 1

From: David Brownell
Date: Fri Dec 22 2006 - 14:24:51 EST


From: Imre Deak <imre.deak@xxxxxxxxx>
Date: Fri May 26 16:30:10 2006 -0700

Input: ads7846: select correct SPI mode

Talk to ADS7846 chip using SPI mode 1, which is what the chip
supports: writes on falling clock edge, reads on rising.

Signed-off-by: Imre Deak <imre.deak@xxxxxxxxx>
Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx>
Signed-off-by: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx>

Index: osk/drivers/input/touchscreen/ads7846.c
===================================================================
--- osk.orig/drivers/input/touchscreen/ads7846.c 2006-12-22 11:08:45.000000000 -0800
+++ osk/drivers/input/touchscreen/ads7846.c 2006-12-22 11:08:46.000000000 -0800
@@ -773,6 +773,10 @@ static int __devinit ads7846_probe(struc
* may not. So we stick to very-portable 8 bit words, both RX and TX.
*/
spi->bits_per_word = 8;
+ spi->mode = SPI_MODE_1;
+ err = spi_setup(spi);
+ if (err < 0)
+ return err;

ts = kzalloc(sizeof(struct ads7846), GFP_KERNEL);
input_dev = input_allocate_device();
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/