Commit 230ffc8e authored by Semih Hazar's avatar Semih Hazar Committed by Dmitry Torokhov

Input: ads7846 - SPI_CPHA mode bugfix

In commit [1] the SPI mode is set to 1, but it should be 0.  As stated
in the commit, ads784x samples the data on the rising edge.  SPI mode 1
samples on the falling edge [2] though.

The root cause of this is a bug in the omap_uwire code, which treats
CPHA=1 incorrectly; so these two bugs cancel each other out on one
of the main regression test platforms for this driver.

[1] kernel.org GIT 7937e86a
[2] http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_BusSigned-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent bff0de5f
...@@ -848,7 +848,7 @@ static int __devinit ads7846_probe(struct spi_device *spi) ...@@ -848,7 +848,7 @@ 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; spi->mode = SPI_MODE_0;
err = spi_setup(spi); err = spi_setup(spi);
if (err < 0) if (err < 0)
return err; return err;
......
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