diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2012-11-13 13:28:00 +0000 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2012-11-19 22:22:11 +0000 |
commit | aacff892cbd5c6b1904a3906219548a65018d750 (patch) | |
tree | 07e8ee424e67ada771e1b5f46be75425a9cdf241 /drivers/staging/iio/gyro | |
parent | a458c55c107c5e467ab5b7e471f77ec5868afcb9 (diff) |
staging:iio:adis: Preallocate transfer message
Currently the driver reads out all sample registers of the device and throws
away those which it does not need. Furthermore the SPI message is constructed
each time the trigger handler is run, although it will be the same each time.
This patch preallocates and pre-constructs the SPI message in the
"update_scan_mode" callback. Only those register which are actually selected for
sampling are included in the message. The patch also gets rid of the conversion
of the sample data from big endian to the native endianness and instead marks
the channel as big endian in its scan type. This allows to directly push the
SPI transfer buffer to the IIO buffer without the need to post-process it.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/staging/iio/gyro')
-rw-r--r-- | drivers/staging/iio/gyro/adis16260_core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/iio/gyro/adis16260_core.c b/drivers/staging/iio/gyro/adis16260_core.c index 820547baae30..b988b4f5bdda 100644 --- a/drivers/staging/iio/gyro/adis16260_core.c +++ b/drivers/staging/iio/gyro/adis16260_core.c @@ -267,6 +267,7 @@ static const struct iio_info adis16260_info = { .attrs = &adis16260_attribute_group, .read_raw = &adis16260_read_raw, .write_raw = &adis16260_write_raw, + .update_scan_mode = adis_update_scan_mode, .driver_module = THIS_MODULE, }; |