Skip to content

New features for the AD5686 IIO driver

Rodrigo Alencar b4-sent linux-devicetree linux-hardening linux-iio lkml 8 versions – In review

Get series with b4
b4 am [email protected] change-id 20260602-ad5686-new-features-e116c04bddb9

Versions newest first

  1. v8 Latest8 patches 15 repliesIn review
  2. v77 patches 15 repliesSuperseded
  3. v66 patches 4 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v512 patches3 repliesSuperseded
v412 patches2 repliesSuperseded
v312 patches18 repliesSuperseded
v212 patches17 repliesSuperseded
v112 patches23 repliesSuperseded

Changes in v8 from the cover letter

- Add nul-check for chip_info match data.
- Update comments/commit text and other minor changes.
- Link to v7: https://lore.kernel.org/r/[email protected]

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8iio: dac: ad5696: properly check i2c_transfer() return valuedrivers/iio/dac/ad5696-i2c.c+4 -11 reply
2/8iio: dac: ad5686: missing NULL check on match datadrivers/iio/dac/ad5686.c+3 -011 replies
3/8iio: dac: ad5686: refactor command/data macrosdrivers/iio/dac/ad5686-spi.c drivers/iio/dac/ad5686.c drivers/iio/dac/ad5686.h +1 more+34 -302 replies
4/8iio: dac: ad5686: introduce sync operationdrivers/iio/dac/ad5686.h+9 -10 replies
5/8iio: dac: ad5686: implement new sync() op for the spi busdrivers/iio/dac/ad5686-spi.c drivers/iio/dac/ad5686.c drivers/iio/dac/ad5686.h +1 more+114 -350 replies
6/8iio: dac: ad5686: read_raw/write_raw: use guard(mutex)()drivers/iio/dac/ad5686.c+8 -110 replies
7/8iio: dac: ad5686: add triggered buffer supportdrivers/iio/dac/Kconfig drivers/iio/dac/ad5686.c+67 -00 replies
8/8iio: dac: ad5686: add gain control supportdrivers/iio/dac/ad5686.c drivers/iio/dac/ad5686.h+125 -70 replies

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchDavid LechnerMaxwell DooseJoshua CroftsAndy Shevchenko
1/8R-b
2/8R-b
3/8R-b
4/8R-b
5/8R-b
6/8R-b R-b R-b R-b
7/8R-b
8/8R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v8 thread

Cover letter [PATCH v8 0/8] New features for the AD5686 IIO driver

This is the second series of three on updating the AD5686 driver.

Initially, a big patch series was sent:
https://lore.kernel.org/r/[email protected]

Then, the first patch series added fixes and cleanups:
https://lore.kernel.org/linux-iio/[email protected]/

This one is introducing new features:
- Consume optional reset and correct power supplies;
- LDAC GPIO handling (active-low, held low when unused);
- SPI bus sync() implementation for batching multiple transfers;
- Triggered buffer support, leveraging LDAC and sync() to flush all channel writes atomically;
- Gain control support through the scale property.

---
Changes in v8:
- Add nul-check for chip_info match data.
- Update comments/commit text and other minor changes.
- Link to v7: https://lore.kernel.org/r/[email protected]

Changes in v7:
- Fix return value check of i2c_transfer().
- Amend refactoring of command/data macros.
- Link to v6: https://lore.kernel.org/r/[email protected]

Changes in v6:
- Refactor command/data macros in favor of FIELD_PREP()
- Link to v5: https://lore.kernel.org/r/[email protected]

Changes in v5:
- Create auxiliary handler for the triggered buffer.
- Do not allow modification of double_scale in case gain_gpio is not set.
- Link to v4: https://lore.kernel.org/r/[email protected]

Changes in v4:
- Replace anyof+const for enum in dt-bindings.
- Address some sashiko's comments.
- Use guard(mutex)() in trigger handler and other misc changes.
- Link to v3: https://lore.kernel.org/r/[email protected]

Changes in v3:
- Add range-double property.
- Acquire reset control after power-up delay.
- Include cleanup.h and use guard(mutex)() in read_raw().
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Get reset control deasserted.
- Update entire spi_transfer struct rather than individual fields.
- Replace udelay() for fsleep() in probe().
- Minor changes addressing further feedback.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Rodrigo Alencar (8):
iio: dac: ad5696: properly check i2c_transfer() return value
iio: dac: ad5686: missing NULL check on match data
iio: dac: ad5686: refactor command/data macros
iio: dac: ad5686: introduce sync operation
iio: dac: ad5686: implement new sync() op for the spi bus
iio: dac: ad5686: read_raw/write_raw: use guard(mutex)()
iio: dac: ad5686: add triggered buffer support
iio: dac: ad5686: add gain control support

 drivers/iio/dac/Kconfig      |   2 +
 drivers/iio/dac/ad5686-spi.c | 142 +++++++++++++++++++++-------
 drivers/iio/dac/ad5686.c     | 217 +++++++++++++++++++++++++++++++++++++++----
 drivers/iio/dac/ad5686.h     |  52 ++++++++---
 drivers/iio/dac/ad5696-i2c.c |  18 ++--
 5 files changed, 355 insertions(+), 76 deletions(-)

---
base-commit: 4c0ecdbdc0d87570f74e656e21d56bae1ab6a8f1
change-id: 20260602-ad5686-new-features-e116c04bddb9

Best regards,

Signature · 1 line
Rodrigo Alencar <[email protected]>