Patch "iio: adis16400: Fix burst transfer for adis16448" has been added to the 4.0-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
iio: adis16400: Fix burst transfer for adis16448
to the 4.0-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
iio-adis16400-fix-burst-transfer-for-adis16448.patch
and it can be found in the queue-4.0 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
d046ba268adb87c7780494ecf897cbafbf100d57Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <[email protected]>
Date: Fri, 15 May 2015 17:18:38 +0200
Subject: iio: adis16400: Fix burst transfer for adis16448
From: Lars-Peter Clausen <[email protected]>
commit d046ba268adb87c7780494ecf897cbafbf100d57 upstream.
The adis16448, unlike the other chips in this family, in addition to the hardware channels also sends out the DIAG_STAT register in burst mode before them. Handle that case by skipping over the first 2 bytes before we pass the received data to the buffer.
--- drivers/iio/imu/adis16400.h | 1 + drivers/iio/imu/adis16400_buffer.c | 10 +++++++++- drivers/iio/imu/adis16400_core.c | 3 ++- 3 files changed, 12 insertions(+), 2 deletions(-)
drivers/iio/imu/adis16400.h +1 -0
@@ -139,6 +139,7 @@#define ADIS16400_NO_BURST BIT(1)#define ADIS16400_HAS_SLOW_MODE BIT(2)#define ADIS16400_HAS_SERIAL_NUMBER BIT(3) +#define ADIS16400_BURST_DIAG_STAT BIT(4)struct adis16400_state ;
drivers/iio/imu/adis16400_buffer.c +9 -1
@@ -29,6 +29,8 @@ int adis16400_update_scan_mode(struct ii/* All but the timestamp channel */ burst_length = (indio_dev->num_channels -1 ) *sizeof (u16); +if (st->variant->flags &ADIS16400_BURST_DIAG_STAT ) + burst_length +=sizeof (u16); adis->xfer =kcalloc (2 ,sizeof (*adis->xfer),GFP_KERNEL );if (!adis->xfer)
@@ -63,6 +65,7 @@ irqreturn_t adis16400_trigger_handler(instruct adis16400_state *st =iio_priv (indio_dev);struct adis *adis = &st->adis;u32 old_speed_hz = st->adis.spi->max_speed_hz; +void *buffer;int ret;if (!adis->buffer)
@@ -83,7 +86,12 @@ irqreturn_t adis16400_trigger_handler(inspi_setup (st->adis.spi); } -iio_push_to_buffers_with_timestamp (indio_dev, adis->buffer, +if (st->variant->flags &ADIS16400_BURST_DIAG_STAT ) + buffer = adis->buffer +sizeof (u16); +else + buffer = adis->buffer; + +iio_push_to_buffers_with_timestamp (indio_dev, buffer, pf->timestamp);iio_trigger_notify_done (indio_dev->trig);
drivers/iio/imu/adis16400_core.c +2 -1
@@ -778,7 +778,8 @@ static struct adis16400_chip_info adis16 .channels = adis16448_channels, .num_channels = ARRAY_SIZE(adis16448_channels), .flags =ADIS16400_HAS_PROD_ID | - ADIS16400_HAS_SERIAL_NUMBER, +ADIS16400_HAS_SERIAL_NUMBER | + ADIS16400_BURST_DIAG_STAT, .gyro_scale_micro = IIO_DEGREE_TO_RAD(10000), /* 0.01 deg/s */ .accel_scale_micro = IIO_G_TO_M_S_2(833), /* 1/1200 g */ .temp_scale_nano = 73860000, /* 0.07386 C */
Patches currently in stable-queue which might be from [email protected] are
queue-4.0/iio-adis16400-fix-burst-transfer-for-adis16448.patch queue-4.0/iio-adis16400-compute-the-scan-mask-from-channel-indices.patch queue-4.0/iio-adis16400-fix-burst-mode.patch queue-4.0/iio-adis16400-report-pressure-channel-scale.patch queue-4.0/iio-adis16400-use-channel-indices-for-the-two-voltage-channels.patch --
To unsubscribe from this list: send the line "unsubscribe stable" in