Skip to content

iio:adc:ad7280a Cleanup and proposed staging graduation.

Jonathan Cameron linux-iio 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest20 patches 2 repliesIn review
  2. v217 patches 31 repliesSuperseded
  3. v117 patches 7 repliesSuperseded

Changes in v3 from the cover letter

All in response to Marcelo Schmitt doing a really detailed review and testing against the QEMU model.

- Moved elements of patch 2 to patch 5 to avoid missing defines.
- Patch 6: Amend ordering to avoid updated software cached values until the hardware write has succeeded.
- Patch 12 Fixed wrong callbacks in no_irq case
- Patch 14: Changed all numeric properties to u32 to avoid needing to specify bit depth in dts.
- Patch 14: Typo fix.
- Patch 15: New Patch to drop the handling of partial aux alert channels as it is buggy (and always was). Anyone wanting to bring this back will hopefully have hardware to test as it will be fiddly.
- Patch 15 (old number, now 16). Update dt bindings to drop the adi,temp-alert-last-chan given new patch 15 drops the support.
- New Patch 18: Change cb_mask software cache to not include the offset of 2 and instead apply that only when writing the registers.
- New Patch 19: More conservative timings to allow 105 degree Centigrade operation.
- Patch 20 is moving the new code so obviously all the above apply to that as well!

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/20staging:iio:adc:ad7280a: Fix handing of device address bit reversing.drivers/staging/iio/adc/ad7280a.c+2 -20 replies
2/20staging:iio:adc:ad7280a: Register define cleanup.drivers/staging/iio/adc/ad7280a.c+154 -1310 replies
3/20staging:iio:adc:ad7280a: rename _read() to _read_reg()drivers/staging/iio/adc/ad7280a.c+4 -40 replies
4/20staging:iio:adc:ad7280a: Split buff[2] into tx and rx partsdrivers/staging/iio/adc/ad7280a.c+9 -80 replies
5/20staging:iio:adc:ad7280a: Use bitfield ops to managed fields in transfers.drivers/staging/iio/adc/ad7280a.c+45 -190 replies
6/20staging:iio:adc:ad7280a: Switch to standard event controldrivers/staging/iio/adc/ad7280a.c+110 -1030 replies
7/20staging:iio:adc:ad7280a: Standardize extended ABI namingdrivers/staging/iio/adc/ad7280a.c+43 -1310 replies
8/20staging:iio:adc:ad7280a: Drop unused timestamp channel.drivers/staging/iio/adc/ad7280a.c+1 -130 replies
9/20staging:iio:adc:ad7280a: Trivial comment formatting cleanupdrivers/staging/iio/adc/ad7280a.c+11 -100 replies
10/20staging:iio:adc:ad7280a: Make oversampling_ratio a runtime controldrivers/staging/iio/adc/ad7280a.c drivers/staging/iio/adc/ad7280a.h+72 -340 replies
11/20staging:iio:adc:ad7280a: Cleanup includesdrivers/staging/iio/adc/ad7280a.c+9 -70 replies
12/20staging:iio:ad7280a: Reflect optionality of irq in ABIdrivers/staging/iio/adc/ad7280a.c+29 -190 replies
13/20staging:iio:adc:ad7280a: Use a local dev pointer to avoid &spi->devdrivers/staging/iio/adc/ad7280a.c+5 -40 replies
14/20staging:iio:adc:ad7280a: Use device properties to replace platform data.drivers/staging/iio/adc/ad7280a.c drivers/staging/iio/adc/ad7280a.h+86 -450 replies
15/20staging:iio:adc:ad7280a: Drop buggy support for early termination of AUX alert.drivers/staging/iio/adc/ad7280a.c+0 -220 replies
16/20dt-bindings:iio:adc:ad7280a: Add bindingDocumentation/devicetree/bindings/iio/adc/adi,ad7280a.yaml+77 -00 replies
17/20iio:adc:ad7280a: Document ABI for cell balance switchesDocumentation/ABI/testing/sysfs-bus-iio-adc-ad7280a+13 -00 replies
18/20staging:iio:adc:ad7280a: Remove shift from cb_mask state cache.drivers/staging/iio/adc/ad7280a.c+7 -50 replies
19/20staging:iio:adc:ad7280a: Use more conservative delays to allow 105C operation.drivers/staging/iio/adc/ad7280a.c+2 -20 replies
20/20iio:adc:ad7280a: Move out of stagingdrivers/iio/adc/Kconfig drivers/iio/adc/Makefile drivers/iio/adc/ad7280a.c +3 more+1123 -11230 replies

Reviews trailers per patch

15 of 20 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMarcelo SchmittRob Herring
SeriesR-b
1/20R-b
2/20R-b
3/20R-b
4/20R-b
5/20R-b
6/20R-b
7/20R-b
8/20R-b
9/20R-b
10/20R-b
11/20R-b
12/20R-b
13/20R-b
14/20
15/20
16/20R-b R-b
17/20R-b
18/20
19/20
20/20

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 00/20] iio:adc:ad7280a Cleanup and proposed staging graduation.

From: Jonathan Cameron <[email protected]>

Changes since v2:
All in response to Marcelo Schmitt doing a really detailed review and testing against the QEMU model.

- Moved elements of patch 2 to patch 5 to avoid missing defines.
- Patch 6: Amend ordering to avoid updated software cached values until the hardware write has succeeded.
- Patch 12 Fixed wrong callbacks in no_irq case
- Patch 14: Changed all numeric properties to u32 to avoid needing to specify bit depth in dts.
- Patch 14: Typo fix.
- Patch 15: New Patch to drop the handling of partial aux alert channels as it is buggy (and always was). Anyone wanting to bring this back will hopefully have hardware to test as it will be fiddly.
- Patch 15 (old number, now 16). Update dt bindings to drop the adi,temp-alert-last-chan given new patch 15 drops the support.
- New Patch 18: Change cb_mask software cache to not include the offset of 2 and instead apply that only when writing the registers.
- New Patch 19: More conservative timings to allow 105 degree Centigrade operation.
- Patch 20 is moving the new code so obviously all the above apply to that as well!

Hi All,

This one proved an interesting diversion.

Work done against a somewhat hacked up QEMU emulation of 3 daisy chained ad7280a devices (18 channels). Note that the emulation isn't complete but does do chaining, CRC, and readout of channels etc in a fashion that worked with the original driver (up to the bug in patch 1) and continues to work with the updated version. I've not intention to upstream the emulation (as would need to make it more completed and flexible), but happy to share it with anyone who is interested.

I briefly flirted with posting a patch to just drop the driver entirely, but the part is still available and it looked like fun + isn't going to greatly impact maintainability of the subsystem long term so is low cost even if it becomes unavailable sometime soon.

There are lots of things we could do after this set to improved the driver and make things more flexible, but it should basically 'just work'

Anyhow, as normal for staging graduations, last patch has rename detection turned off so that people can easily see what I am proposing we move out of staging.

All comments welcome and thanks to Marcelo for reviewing this beast!

Thanks,

Jonathan

Jonathan Cameron (20):
staging:iio:adc:ad7280a: Fix handing of device address bit reversing. staging:iio:adc:ad7280a: Register define cleanup. staging:iio:adc:ad7280a: rename _read() to _read_reg() staging:iio:adc:ad7280a: Split buff[2] into tx and rx parts staging:iio:adc:ad7280a: Use bitfield ops to managed fields in
transfers.
staging:iio:adc:ad7280a: Switch to standard event control staging:iio:adc:ad7280a: Standardize extended ABI naming staging:iio:adc:ad7280a: Drop unused timestamp channel. staging:iio:adc:ad7280a: Trivial comment formatting cleanup staging:iio:adc:ad7280a: Make oversampling_ratio a runtime control staging:iio:adc:ad7280a: Cleanup includes staging:iio:ad7280a: Reflect optionality of irq in ABI staging:iio:adc:ad7280a: Use a local dev pointer to avoid &spi->dev staging:iio:adc:ad7280a: Use device properties to replace platform
data.
staging:iio:adc:ad7280a: Drop buggy support for early termination of
AUX alert.
dt-bindings:iio:adc:ad7280a: Add binding
iio:adc:ad7280a: Document ABI for cell balance switches staging:iio:adc:ad7280a: Remove shift from cb_mask state cache. staging:iio:adc:ad7280a: Use more conservative delays to allow 105C
operation.
iio:adc:ad7280a: Move out of staging

 .../ABI/testing/sysfs-bus-iio-adc-ad7280a     |   13 +
 .../bindings/iio/adc/adi,ad7280a.yaml         |   77 ++
 drivers/iio/adc/Kconfig                       |   11 +
 drivers/iio/adc/Makefile                      |    1 +
 drivers/iio/adc/ad7280a.c                     | 1111 +++++++++++++++++
 drivers/staging/iio/adc/Kconfig               |   11 -
 drivers/staging/iio/adc/Makefile              |    1 -
 drivers/staging/iio/adc/ad7280a.c             | 1044 ----------------
 drivers/staging/iio/adc/ad7280a.h             |   37 -
 9 files changed, 1213 insertions(+), 1093 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-adc-ad7280a
 create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7280a.yaml
 create mode 100644 drivers/iio/adc/ad7280a.c
 delete mode 100644 drivers/staging/iio/adc/ad7280a.c
 delete mode 100644 drivers/staging/iio/adc/ad7280a.h
Signature · 1 line
2.35.1