iio: accel: adxl372: Set iio_chan BE
authorAlexandru Tachici <alexandru.tachici@analog.com>
Wed, 19 Feb 2020 14:31:12 +0000 (16:31 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 8 Mar 2020 16:21:21 +0000 (16:21 +0000)
Data stored in the iio-buffer is BE and this
should be specified in the iio_chan_spec struct.

Fixes: f4f55ce38e5f8 ("iio:adxl372: Add FIFO and interrupts support")
Signed-off-by: Alexandru Tachici <alexandru.tachici@analog.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/adxl372.c

index 67b8817..60daf04 100644 (file)
@@ -237,6 +237,7 @@ static const struct adxl372_axis_lookup adxl372_axis_lookup_table[] = {
                .realbits = 12,                                         \
                .storagebits = 16,                                      \
                .shift = 4,                                             \
+               .endianness = IIO_BE,                                   \
        },                                                              \
 }