Skip to content

Commit 9898cb2

Browse files
Uwe Kleine-Königjic23
authored andcommitted
iio: adc: ti-ads7950: Ensure CS is deasserted after reading channels
The ADS7950 requires that CS is deasserted after each SPI word. Before commit e2540da ("iio: adc: ti-ads7950: use SPI_CS_WORD to reduce CPU usage") the driver used a message with one spi transfer per channel where each but the last one had .cs_change set to enforce a CS toggle. This was wrongly translated into a message with a single transfer and .cs_change set which results in a CS toggle after each word but the last which corrupts the first adc conversion of all readouts after the first readout. Fixes: e2540da ("iio: adc: ti-ads7950: use SPI_CS_WORD to reduce CPU usage") Signed-off-by: Uwe Kleine-König <[email protected]> Reviewed-by: David Lechner <[email protected]> Tested-by: David Lechner <[email protected]> Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 4377d9a commit 9898cb2

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/iio/adc/ti-ads7950.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,6 @@ static int ti_ads7950_probe(struct spi_device *spi)
568568
st->ring_xfer.tx_buf = &st->tx_buf[0];
569569
st->ring_xfer.rx_buf = &st->rx_buf[0];
570570
/* len will be set later */
571-
st->ring_xfer.cs_change = true;
572571

573572
spi_message_add_tail(&st->ring_xfer, &st->ring_msg);
574573

0 commit comments

Comments
 (0)