From: Imre Deak Date: Thu, 18 Jan 2007 05:45:38 +0000 (-0500) Subject: Input: ads7846 - select correct SPI mode X-Git-Tag: v2.6.21-rc1~91^2~235^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7937e86a70235e1584486654687dc9908a11e00a;p=platform%2Fupstream%2Fkernel-adaptation-pc.git 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 Signed-off-by: Tony Lindgren Signed-off-by: David Brownell Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index d983cc5..11979be 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -710,6 +710,10 @@ static int __devinit ads7846_probe(struct spi_device *spi) * 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();