diff options
author | Liam Beguin <[email protected]> | 2021-08-15 17:33:06 -0400 |
---|---|---|
committer | Jonathan Cameron <[email protected]> | 2021-09-14 12:00:30 +0100 |
commit | 0b2a740b424e68e346e3797eaa7c155575ae7c14 (patch) | |
tree | 5fc5e501e5ac27d201cddcf512a155ce3b034765 /lib/mpi/mpiutil.c | |
parent | 595a0590f4fbcb39d73a7c55c79a7e7921ec1614 (diff) |
iio: adc: ad7949: enable use with non 14/16-bit controllers
This driver supports devices with 14-bit and 16-bit sample sizes.
This implies different SPI transfer lengths which are not always handled
properly by some SPI controllers.
To work around this limitation, define a big endian buffer used to split
the buffer into two 8-bit messages in the event that the controller
doesn't support 14-bit or 16-bit transfers.
A separate buffer is introduced here to avoid performing operations on
types of different endianness.
Since all transfers use the same bits_per_word value, move that logic to
the probe function, and let transfers default to the value defined in
the struct spi_device.
Signed-off-by: Liam Beguin <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'lib/mpi/mpiutil.c')
0 files changed, 0 insertions, 0 deletions