]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] ARM: OMAP: Input: ads7846: select correct SPI mode
authorImre Deak <imre.deak@nokia.com>
Fri, 26 May 2006 23:30:10 +0000 (16:30 -0700)
committerTony Lindgren <tony@atomide.com>
Fri, 26 May 2006 23:30:10 +0000 (16:30 -0700)
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 <imre.deak@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/input/touchscreen/ads7846.c

index cb7fda152e44103221862ef35f4dc508c7ab8c47..436984532d486e31afdaf434581d1a98e6ac294d 100644 (file)
@@ -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;