Commit 7937e86a authored by Imre Deak's avatar Imre Deak Committed by Dmitry Torokhov

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: default avatarImre Deak <imre.deak@nokia.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 1936d590
...@@ -710,6 +710,10 @@ static int __devinit ads7846_probe(struct spi_device *spi) ...@@ -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. * may not. So we stick to very-portable 8 bit words, both RX and TX.
*/ */
spi->bits_per_word = 8; 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); ts = kzalloc(sizeof(struct ads7846), GFP_KERNEL);
input_dev = input_allocate_device(); input_dev = input_allocate_device();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment