Skip to content

Commit

Permalink
Input: ads7846 - SPI_CPHA mode bugfix
Browse files Browse the repository at this point in the history
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 7937e86
[2] http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Semih Hazar authored and Dmitry Torokhov committed May 23, 2007
1 parent bff0de5 commit 230ffc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/touchscreen/ads7846.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
spi->bits_per_word = 8;
spi->mode = SPI_MODE_1;
spi->mode = SPI_MODE_0;
err = spi_setup(spi);
if (err < 0)
return err;
Expand Down

0 comments on commit 230ffc8

Please sign in to comment.