Input: ads7846: select correct SPI mode
PATCH 3/3 Input: ads7846: select correct SPI mode
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 <[email protected]>
drivers/input/touchscreen/ads7846.c +4 -0
@@ -683,6 +683,10 @@ static int __devinit ads7846_probe(strucdev_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;