All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] Input: ads7846: do not overwrite spi->mode flags set by spi framework
@ 2020-10-21  9:04 Oleksij Rempel
  2020-10-21  9:29 ` Ardelean, Alexandru
  0 siblings, 1 reply; 7+ messages in thread
From: Oleksij Rempel @ 2020-10-21  9:04 UTC (permalink / raw)
  To: Dmitry Torokhov, Alexandru Ardelean
  Cc: Oleksij Rempel, kernel, linux-kernel, linux-input, David Jander

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>
---
 drivers/input/touchscreen/ads7846.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index 8fd7fc39c4fd..ea31956f3a90 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -1288,7 +1288,7 @@ 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_0;
 	err = spi_setup(spi);
 	if (err < 0)
 		return err;
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-10-27  8:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-21  9:04 [PATCH v1] Input: ads7846: do not overwrite spi->mode flags set by spi framework Oleksij Rempel
2020-10-21  9:29 ` Ardelean, Alexandru
2020-10-21 10:56   ` Oleksij Rempel
2020-10-21 18:27     ` Dmitry Torokhov
2020-10-22  6:54       ` Oleksij Rempel
2020-10-27  3:53         ` Dmitry Torokhov
2020-10-27  8:07           ` Oleksij Rempel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.