summaryrefslogtreecommitdiffstats
path: root/drivers/iio/imu/adis16400.h
diff options
context:
space:
mode:
authorMarcus Folkesson <marcus.folkesson@gmail.com>2014-01-24 12:24:00 +0100
committerJonathan Cameron <jic23@kernel.org>2014-02-08 12:26:06 +0100
commitc76782d151dab7ecfdcdf9a01561c2d61d9b490f (patch)
tree222af39a5e74e699001ffaad38b6283c7b603ef7 /drivers/iio/imu/adis16400.h
parentiio: ak8975: Fix calculation formula for convert micro tesla to gauss unit (diff)
downloadlinux-c76782d151dab7ecfdcdf9a01561c2d61d9b490f.tar.xz
linux-c76782d151dab7ecfdcdf9a01561c2d61d9b490f.zip
iio: adis16400: Set timestamp as the last element in chan_spec
This is necessary since timestamp is calculated as the last element in iio_compute_scan_bytes(). Without this fix any userspace code reading the layout of the buffer via sysfs will incorrectly interpret the data leading some nasty corruption. Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Cc: stable@vger.kernel.org Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/imu/adis16400.h')
-rw-r--r--drivers/iio/imu/adis16400.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/imu/adis16400.h b/drivers/iio/imu/adis16400.h
index 2f8f9d632386..0916bf6b6c31 100644
--- a/drivers/iio/imu/adis16400.h
+++ b/drivers/iio/imu/adis16400.h
@@ -189,6 +189,7 @@ enum {
ADIS16300_SCAN_INCLI_X,
ADIS16300_SCAN_INCLI_Y,
ADIS16400_SCAN_ADC,
+ ADIS16400_SCAN_TIMESTAMP,
};
#ifdef CONFIG_IIO_BUFFER