diff options
author | Semih Hazar <semih.hazar@indefia.com> | 2007-05-22 23:35:12 -0400 |
---|---|---|
committer | Dmitry Torokhov <dtor@insightbb.com> | 2007-05-22 23:35:12 -0400 |
commit | 230ffc8e348e7841b79fd7c659d16aa5d7ec8a69 (patch) | |
tree | abd53863436714298c5b8920cbbbb9b2cf9ba6b7 /drivers/input/touchscreen/ads7846.c | |
parent | bff0de5f59ff935138eb41c397a7e50468028b83 (diff) |
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 7937e86a70235e1584486654687dc9908a11e00a
[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>
Diffstat (limited to 'drivers/input/touchscreen/ads7846.c')
-rw-r--r-- | drivers/input/touchscreen/ads7846.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index b0110fe65dae..1c9069cd3bae 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c | |||
@@ -848,7 +848,7 @@ static int __devinit ads7846_probe(struct spi_device *spi) | |||
848 | * may not. So we stick to very-portable 8 bit words, both RX and TX. | 848 | * may not. So we stick to very-portable 8 bit words, both RX and TX. |
849 | */ | 849 | */ |
850 | spi->bits_per_word = 8; | 850 | spi->bits_per_word = 8; |
851 | spi->mode = SPI_MODE_1; | 851 | spi->mode = SPI_MODE_0; |
852 | err = spi_setup(spi); | 852 | err = spi_setup(spi); |
853 | if (err < 0) | 853 | if (err < 0) |
854 | return err; | 854 | return err; |