mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 11:03:43 +02:00
iio: adc: ad7944: drop bits_per_word hack
Remove setting bits_per_word in SPI xfers without data. The shortcoming that this was working around was fixed in the SPI controller driver, so it is no longer necessary. And we don't need this to be cargo-culted to new drivers. Signed-off-by: David Lechner <dlechner@baylibre.com> Reviewed-by: Nuno Sá <nuno.sa@analog.com> Link: https://patch.msgid.link/20250331-iio-adc-ad7944-drop-bits_per_word-hack-v1-1-2b952e033340@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
7a84e33afe
commit
ff2e2a5c52
|
|
@ -189,11 +189,6 @@ static int ad7944_3wire_cs_mode_init_msg(struct device *dev, struct ad7944_adc *
|
|||
: adc->timing_spec->conv_ns;
|
||||
struct spi_transfer *xfers = adc->xfers;
|
||||
|
||||
/*
|
||||
* NB: can get better performance from some SPI controllers if we use
|
||||
* the same bits_per_word in every transfer.
|
||||
*/
|
||||
xfers[0].bits_per_word = chan->scan_type.realbits;
|
||||
/*
|
||||
* CS is tied to CNV and we need a low to high transition to start the
|
||||
* conversion, so place CNV low for t_QUIET to prepare for this.
|
||||
|
|
@ -208,7 +203,6 @@ static int ad7944_3wire_cs_mode_init_msg(struct device *dev, struct ad7944_adc *
|
|||
xfers[1].cs_off = 1;
|
||||
xfers[1].delay.value = t_conv_ns;
|
||||
xfers[1].delay.unit = SPI_DELAY_UNIT_NSECS;
|
||||
xfers[1].bits_per_word = chan->scan_type.realbits;
|
||||
|
||||
/* Then we can read the data during the acquisition phase */
|
||||
xfers[2].rx_buf = &adc->sample.raw;
|
||||
|
|
@ -227,11 +221,6 @@ static int ad7944_4wire_mode_init_msg(struct device *dev, struct ad7944_adc *adc
|
|||
: adc->timing_spec->conv_ns;
|
||||
struct spi_transfer *xfers = adc->xfers;
|
||||
|
||||
/*
|
||||
* NB: can get better performance from some SPI controllers if we use
|
||||
* the same bits_per_word in every transfer.
|
||||
*/
|
||||
xfers[0].bits_per_word = chan->scan_type.realbits;
|
||||
/*
|
||||
* CS has to be high for full conversion time to avoid triggering the
|
||||
* busy indication.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user