Skip to content

Refactor ADIS Burst Mode

Nuno Sá linux-iio 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4iio: adis: Move burst mode into adis_datadrivers/iio/imu/adis_buffer.c include/linux/iio/imu/adis.h+14 -70 replies
2/4iio: adis16400: Drop adis_burst usagedrivers/iio/imu/adis16400.c+13 -190 replies
3/4iio: adis16475: Drop adis_burst usagedrivers/iio/imu/adis16475.c+3 -150 replies
4/4iio: adis. Drop adis_burst structinclude/linux/iio/imu/adis.h+0 -170 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] Refactor ADIS Burst Mode

This series refactors the ADIS burst mode. The 2 main ideas of the refactor are:

1. As discussed in previous patches, there's no point in enabling/disabling burst mode at runtime. Hence, we can drop the en variable.
2. Replace the extra_len by burst_len where users have now to explicitly define the size of the burst buffer. The point is to remove the following line from the lib:

```
/* All but the timestamp channel */
burst_length = (indio_dev->num_channels - 1) * sizeof(u16);
```

The library should not assume that a timestamp channel is defined. Moreover, most parts also include some diagnostic data, crc, etc.. in the burst buffer that needed to be included in an extra_len variable which is not that nice. On top of this, some devices already start to have some 32bit size channels ...

While doing this (and mainly when looking at the adis16400) drivers it felt that the burst variables belong to the per chip adis_data structure. As seen in the adis16400 driver, some drivers might support multiple devices with different burst sizes.

For now, it does not feel necessary to wrap these variables in a adis_burst structure but I don't see any problem in doing so if required...

Nuno Sá (4):
iio: adis: Move burst mode into adis_data
iio: adis16400: Drop adis_burst usage
iio: adis16475: Drop adis_burst usage
iio: adis. Drop adis_burst struct

 drivers/iio/imu/adis16400.c   | 32 +++++++++++++-------------------
 drivers/iio/imu/adis16475.c   | 18 +++---------------
 drivers/iio/imu/adis_buffer.c | 12 +++++-------
 include/linux/iio/imu/adis.h  | 26 +++++++++-----------------
 4 files changed, 30 insertions(+), 58 deletions(-)
Signature · 1 line
2.28.0