From: Imre Deak Date: Fri, 26 May 2006 23:30:10 +0000 (-0700) Subject: [PATCH] ARM: OMAP: Input: ads7846: select correct SPI mode X-Git-Tag: v2.6.17-omap1~44 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=17bd6d0083f28b12bc3c0de812721563d09cc996;p=linux-2.6-omap-h63xx.git [PATCH] ARM: OMAP: Input: ads7846: select correct SPI mode The device is using a protocoll where writes are on the falling, reads are on the rising edge of the clock. This maps to SPI mode 1. Signed-off-by: Imre Deak Signed-off-by: Tony Lindgren --- diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index cb7fda152e4..436984532d4 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -683,6 +683,10 @@ static int __devinit ads7846_probe(struct spi_device *spi) dev_set_drvdata(&spi->dev, ts); spi->dev.power.power_state = PMSG_ON; + spi->mode = SPI_MODE_1; + err = spi_setup(spi); + if (err < 0) + goto err_free_mem; ts->spi = spi; ts->input = input_dev;