Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: dac: ad5791: fix storage

IIO uses "natural" alignment so storagebits should always be a power of
2. Change storagebits to 32 since that is the natural size to store 24
bits of data.

The ad5791 driver currently doesn't use this field anywhere and doesn't
support buffered writes, so this does not change anything. We just don't
want anyone to think that it is OK to have storagebits = 24 in other
drivers.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://patch.msgid.link/20250122-iio-dac-ad5791-fix-storagebits-v1-1-53746e0f25cd@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

David Lechner and committed by
Jonathan Cameron
3ea0944d 3bb41551

+1 -1
+1 -1
drivers/iio/dac/ad5791.c
··· 294 294 .scan_type = { \ 295 295 .sign = 'u', \ 296 296 .realbits = (bits), \ 297 - .storagebits = 24, \ 297 + .storagebits = 32, \ 298 298 .shift = (_shift), \ 299 299 }, \ 300 300 .ext_info = ad5791_ext_info, \