projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5ef76da
)
Input: ads7846: do not overwrite spi->mode flags set by spi framework
author
Oleksij Rempel
<o.rempel@pengutronix.de>
Tue, 27 Oct 2020 09:57:24 +0000
(10:57 +0100)
committer
Mark Brown
<broonie@kernel.org>
Thu, 12 Nov 2020 18:45:08 +0000
(18:45 +0000)
Do not overwrite spi->mode flags set by spi framework, otherwise the
chip select polarity will get lost.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Link:
https://lore.kernel.org/r/20201027095724.18654-3-o.rempel@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/input/touchscreen/ads7846.c
patch
|
blob
|
history
diff --git
a/drivers/input/touchscreen/ads7846.c
b/drivers/input/touchscreen/ads7846.c
index 8fd7fc39c4fd7bf48f13197806b579922c9406e6..f2dc2c8ab5ecd8a02636466348569f1adfaa6f78 100644
(file)
--- a/
drivers/input/touchscreen/ads7846.c
+++ b/
drivers/input/touchscreen/ads7846.c
@@
-1288,7
+1288,8
@@
static int 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_0;
+ spi->mode &= ~SPI_MODE_X_MASK;
+ spi->mode |= SPI_MODE_0;
err = spi_setup(spi);
if (err < 0)
return err;