summaryrefslogtreecommitdiff
path: root/drivers/video/backlight/tosa_lcd.c
diff options
context:
space:
mode:
authorRobert Jarzmik <robert.jarzmik@free.fr>2017-12-28 09:27:41 +0100
committerLee Jones <lee.jones@linaro.org>2018-01-08 09:21:57 +0000
commit2023b0524a6310e9ea80daf085f51c71bff9289f (patch)
treecff686e23bde1884d6b1ca7df1c9119f4e557fb9 /drivers/video/backlight/tosa_lcd.c
parent12a9d3bb6a258011edec3fa341cbca3cd0734e5d (diff)
downloadlinux-sh-2023b0524a6310e9ea80daf085f51c71bff9289f.tar.gz
backlight: tdo24m: Fix the SPI CS between transfers
Currently the LCD display (TD035S) on the cm-x300 platform is broken and remains blank. The TD0245S specification requires that the chipselect is toggled between commands sent to the panel. This was also the purpose of the former patch of commit f64dcac0b124 ("backlight: tdo24m: ensure chip select changes between transfers"). Unfortunately, the "cs_change" field of a SPI transfer is misleading. Its true meaning is that for a SPI message holding multiple transfers, the chip select is toggled between each transfer, but for the last transfer it remains asserted. In this driver, all the SPI messages contain exactly one transfer, which means that each transfer is the last of its message, and as a consequence the chip select is never toggled. Actually, there was a second bug hidding the first one, hence the problem was not seen until v4.6. This problem was fixed by commit a52db659c79c ("spi: pxa2xx: Fix cs_change management") for PXA based boards. This fix makes the TD035S work again on a cm-x300 board. The same applies to other PXA boards, ie. corgi and tosa. Fixes: a52db659c79c ("spi: pxa2xx: Fix cs_change management") Reported-by: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Acked-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/video/backlight/tosa_lcd.c')
-rw-r--r--drivers/video/backlight/tosa_lcd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/backlight/tosa_lcd.c b/drivers/video/backlight/tosa_lcd.c
index 6a41ea92737a..4dc5ee8debeb 100644
--- a/drivers/video/backlight/tosa_lcd.c
+++ b/drivers/video/backlight/tosa_lcd.c
@@ -49,7 +49,7 @@ static int tosa_tg_send(struct spi_device *spi, int adrs, uint8_t data)
struct spi_message msg;
struct spi_transfer xfer = {
.len = 1,
- .cs_change = 1,
+ .cs_change = 0,
.tx_buf = buf,
};