diff options
| author | Liam Beguin <lvb@xiphos.com> | 2021-08-15 17:33:06 -0400 |
|---|---|---|
| committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-09-14 12:00:30 +0100 |
| commit | 0b2a740b424e68e346e3797eaa7c155575ae7c14 (patch) | |
| tree | 5fc5e501e5ac27d201cddcf512a155ce3b034765 /include/linux/stackprotector.h | |
| parent | 595a0590f4fbcb39d73a7c55c79a7e7921ec1614 (diff) | |
| download | cachepc-linux-0b2a740b424e68e346e3797eaa7c155575ae7c14.tar.gz cachepc-linux-0b2a740b424e68e346e3797eaa7c155575ae7c14.zip | |
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 <lvb@xiphos.com>
Link: https://lore.kernel.org/r/20210815213309.2847711-3-liambeguin@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include/linux/stackprotector.h')
0 files changed, 0 insertions, 0 deletions
