* [PATCH v2 0/6] iio: dac: ad5686: extend device support
@ 2026-07-24 12:03 Rodrigo Alencar via B4 Relay
2026-07-24 12:03 ` [PATCH v2 1/6] dt-bindings: iio: dac: ad5696: add AD5673R/AD5677R support Rodrigo Alencar via B4 Relay
` (5 more replies)
0 siblings, 6 replies; 10+ messages in thread
From: Rodrigo Alencar via B4 Relay @ 2026-07-24 12:03 UTC (permalink / raw)
To: Michael Auchter, linux, linux-iio, devicetree, linux-kernel
Cc: Michael Hennerich, Jonathan Cameron, David Lechner,
Andy Shevchenko, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Rodrigo Alencar, Conor Dooley
This is the third series of three on updating the AD5686 driver.
Initially, a big patch series was sent:
https://lore.kernel.org/r/20260422-ad5313r-iio-support-v1-0-ed7dca001d1b@analog.com
Then, the first patch series added fixes and cleanups:
https://lore.kernel.org/all/20260524-ad5686-fixes-v7-0-b6bf395d08bd@analog.com/
The second series introduced new features:
https://lore.kernel.org/all/20260716-ad5686-new-features-v8-0-ebb0051af5e5@analog.com/
This series adds support for:
- SPI: AD5313R, AD5317R, AD5674, AD5679, AD5687, AD5687R, AD5689, AD5689R;
- I2C: AD5316R, AD5675, AD5697R
Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com>
---
Changes in v2:
- Missing devices in I2C drivers as cleanup patches.
- Refactor of Kconfig device list as a cleanup patch.
- Link to v1: https://lore.kernel.org/r/20260719-ad5686-extend-dev-support-v1-0-841ec75cf5d8@analog.com
---
Rodrigo Alencar (6):
dt-bindings: iio: dac: ad5696: add AD5673R/AD5677R support
iio: dac: ad5696: add AD5673R/AD5677R entries to of_match table
iio: dac: ad5686: refactor device list and file header comments
dt-bindings: iio: dac: ad5696: extend device support
dt-bindings: iio: dac: ad5686: extend device support
iio: dac: ad5686: extend device support with new parts
.../devicetree/bindings/iio/dac/adi,ad5686.yaml | 14 +++++-
.../devicetree/bindings/iio/dac/adi,ad5696.yaml | 6 +++
drivers/iio/dac/Kconfig | 31 +++++++++---
drivers/iio/dac/ad5686-spi.c | 21 ++++++--
drivers/iio/dac/ad5686.c | 57 +++++++++++++++++++++-
drivers/iio/dac/ad5686.h | 7 +++
drivers/iio/dac/ad5696-i2c.c | 12 +++--
7 files changed, 132 insertions(+), 16 deletions(-)
---
base-commit: 1258e8ca13866b1a60895abf0ab8a4dd77bf4bfd
change-id: 20260719-ad5686-extend-dev-support-e0ddd119f19c
Best regards,
--
Rodrigo Alencar <rodrigo.alencar@analog.com>
^ permalink raw reply [flat|nested] 10+ messages in thread* [PATCH v2 1/6] dt-bindings: iio: dac: ad5696: add AD5673R/AD5677R support 2026-07-24 12:03 [PATCH v2 0/6] iio: dac: ad5686: extend device support Rodrigo Alencar via B4 Relay @ 2026-07-24 12:03 ` Rodrigo Alencar via B4 Relay 2026-07-24 12:18 ` sashiko-bot 2026-07-24 12:03 ` [PATCH v2 2/6] iio: dac: ad5696: add AD5673R/AD5677R entries to of_match table Rodrigo Alencar via B4 Relay ` (4 subsequent siblings) 5 siblings, 1 reply; 10+ messages in thread From: Rodrigo Alencar via B4 Relay @ 2026-07-24 12:03 UTC (permalink / raw) To: Michael Auchter, linux, linux-iio, devicetree, linux-kernel Cc: Michael Hennerich, Jonathan Cameron, David Lechner, Andy Shevchenko, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Rodrigo Alencar From: Rodrigo Alencar <rodrigo.alencar@analog.com> Add compatible entries for AD5673R and AD5677R. These 16-channel devices have different bit resolutions so no fallback compatibles are used. Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com> --- Documentation/devicetree/bindings/iio/dac/adi,ad5696.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5696.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5696.yaml index e10f8596f9d3..5a93edc976f0 100644 --- a/Documentation/devicetree/bindings/iio/dac/adi,ad5696.yaml +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5696.yaml @@ -19,7 +19,9 @@ properties: - adi,ad5337r - adi,ad5338r - adi,ad5671r + - adi,ad5673r - adi,ad5675r + - adi,ad5677r - adi,ad5691r - adi,ad5692r - adi,ad5693 -- 2.43.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2 1/6] dt-bindings: iio: dac: ad5696: add AD5673R/AD5677R support 2026-07-24 12:03 ` [PATCH v2 1/6] dt-bindings: iio: dac: ad5696: add AD5673R/AD5677R support Rodrigo Alencar via B4 Relay @ 2026-07-24 12:18 ` sashiko-bot 0 siblings, 0 replies; 10+ messages in thread From: sashiko-bot @ 2026-07-24 12:18 UTC (permalink / raw) To: Rodrigo Alencar; +Cc: robh, devicetree, conor+dt Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: Pre-existing issues: - [High] Missing 'adi,ad5673r' and 'adi,ad5677r' in the ad5696-i2c driver's of_device_id table breaks module autoloading. -- --- Patch [1]: [PATCH v2 1/6] dt-bindings: iio: dac: ad5696: add AD5673R/AD5677R support --- commit 0615f695e24a3ce3cbdf232377b1a0e2894200a2 Author: Rodrigo Alencar <rodrigo.alencar@analog.com> dt-bindings: iio: dac: ad5696: add AD5673R/AD5677R support Add compatible entries for the AD5673R and AD5677R devices to the ad5696 device tree bindings. These 16-channel devices use different bit resolutions so no fallback compatibles are used. > diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5696.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5696.yaml > index e10f8596f9d3f..5a93edc976f01 100644 > --- a/Documentation/devicetree/bindings/iio/dac/adi,ad5696.yaml > +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5696.yaml > @@ -19,7 +19,9 @@ properties: > - adi,ad5337r > - adi,ad5338r > - adi,ad5671r > + - adi,ad5673r > - adi,ad5675r > + - adi,ad5677r [Severity: High] This isn't a bug introduced by this patch, but does the driver also need to be updated to match these new compatible strings? Looking at drivers/iio/dac/ad5696-i2c.c:ad5686_of_match(): static const struct of_device_id ad5686_of_match[] = { { .compatible = "adi,ad5311r", .data = &ad5311r_chip_info }, ... It appears 'adi,ad5673r' and 'adi,ad5677r' are missing from this table. When the system boots and the I2C core generates an of: modalias for DT-instantiated devices, could the lack of these entries cause module autoloading to silently fail for the ad5696-i2c driver? > - adi,ad5691r > - adi,ad5692r > - adi,ad5693 -- Sashiko AI review · https://sashiko.dev/#/patchset/20260724-ad5686-extend-dev-support-v2-0-cfc2b30ce988@analog.com?part=1 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 2/6] iio: dac: ad5696: add AD5673R/AD5677R entries to of_match table 2026-07-24 12:03 [PATCH v2 0/6] iio: dac: ad5686: extend device support Rodrigo Alencar via B4 Relay 2026-07-24 12:03 ` [PATCH v2 1/6] dt-bindings: iio: dac: ad5696: add AD5673R/AD5677R support Rodrigo Alencar via B4 Relay @ 2026-07-24 12:03 ` Rodrigo Alencar via B4 Relay 2026-07-24 12:03 ` [PATCH v2 3/6] iio: dac: ad5686: refactor device list and file header comments Rodrigo Alencar via B4 Relay ` (3 subsequent siblings) 5 siblings, 0 replies; 10+ messages in thread From: Rodrigo Alencar via B4 Relay @ 2026-07-24 12:03 UTC (permalink / raw) To: Michael Auchter, linux, linux-iio, devicetree, linux-kernel Cc: Michael Hennerich, Jonathan Cameron, David Lechner, Andy Shevchenko, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Rodrigo Alencar From: Rodrigo Alencar <rodrigo.alencar@analog.com> Populate of_match table with AD5673R/AD5677R entries, already supported by the driver and available in the id_table. Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com> --- drivers/iio/dac/ad5696-i2c.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iio/dac/ad5696-i2c.c b/drivers/iio/dac/ad5696-i2c.c index 31439567f00f..4ddf2e151d47 100644 --- a/drivers/iio/dac/ad5696-i2c.c +++ b/drivers/iio/dac/ad5696-i2c.c @@ -104,7 +104,9 @@ static const struct of_device_id ad5686_of_match[] = { { .compatible = "adi,ad5337r", .data = &ad5337r_chip_info }, { .compatible = "adi,ad5338r", .data = &ad5338r_chip_info }, { .compatible = "adi,ad5671r", .data = &ad5672r_chip_info }, + { .compatible = "adi,ad5673r", .data = &ad5674r_chip_info }, { .compatible = "adi,ad5675r", .data = &ad5676r_chip_info }, + { .compatible = "adi,ad5677r", .data = &ad5679r_chip_info }, { .compatible = "adi,ad5691r", .data = &ad5681r_chip_info }, { .compatible = "adi,ad5692r", .data = &ad5682r_chip_info }, { .compatible = "adi,ad5693", .data = &ad5683_chip_info }, -- 2.43.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 3/6] iio: dac: ad5686: refactor device list and file header comments 2026-07-24 12:03 [PATCH v2 0/6] iio: dac: ad5686: extend device support Rodrigo Alencar via B4 Relay 2026-07-24 12:03 ` [PATCH v2 1/6] dt-bindings: iio: dac: ad5696: add AD5673R/AD5677R support Rodrigo Alencar via B4 Relay 2026-07-24 12:03 ` [PATCH v2 2/6] iio: dac: ad5696: add AD5673R/AD5677R entries to of_match table Rodrigo Alencar via B4 Relay @ 2026-07-24 12:03 ` Rodrigo Alencar via B4 Relay 2026-07-24 12:16 ` sashiko-bot 2026-07-24 12:03 ` [PATCH v2 4/6] dt-bindings: iio: dac: ad5696: extend device support Rodrigo Alencar via B4 Relay ` (2 subsequent siblings) 5 siblings, 1 reply; 10+ messages in thread From: Rodrigo Alencar via B4 Relay @ 2026-07-24 12:03 UTC (permalink / raw) To: Michael Auchter, linux, linux-iio, devicetree, linux-kernel Cc: Michael Hennerich, Jonathan Cameron, David Lechner, Andy Shevchenko, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Rodrigo Alencar From: Rodrigo Alencar <rodrigo.alencar@analog.com> Refactor device list in Kconfig, sorting devices by channel count. Also, remove device description from file headers. One can rely on the ID table(s) to check for supported devices. AD5337R is ommited as it does not seem to exist, i.e. its documentation could not be found. Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com> --- drivers/iio/dac/Kconfig | 29 ++++++++++++++++++++++------- drivers/iio/dac/ad5686-spi.c | 5 +---- drivers/iio/dac/ad5686.c | 2 +- drivers/iio/dac/ad5696-i2c.c | 4 +--- 4 files changed, 25 insertions(+), 15 deletions(-) diff --git a/drivers/iio/dac/Kconfig b/drivers/iio/dac/Kconfig index d6d560c09e25..3ae997939ff5 100644 --- a/drivers/iio/dac/Kconfig +++ b/drivers/iio/dac/Kconfig @@ -251,9 +251,16 @@ config AD5686_SPI depends on SPI select AD5686 help - Say yes here to build support for Analog Devices AD5672R, AD5674R, - AD5676, AD5676R, AD5679R, AD5684, AD5684R, AD5684R, AD5685R, AD5686, - AD5686R Voltage Output Digital to Analog Converter. + Say yes here to build support for Analog Devices Voltage Output + Digital to Analog Converters: + - Single-channel: + AD5310R, AD5681R, AD5682R, AD5683, AD5683R + - Quad-channel: + AD5684, AD5684R, AD5685R, AD5686, AD5686R + - 8-channel: + AD5672R, AD5676, AD5676R + - 16-channel: + AD5674R, AD5679R To compile this driver as a module, choose M here: the module will be called ad5686. @@ -263,10 +270,18 @@ config AD5696_I2C depends on I2C select AD5686 help - Say yes here to build support for Analog Devices AD5311R, AD5337, - AD5338R, AD5671R, AD5673R, AD5675R, AD5677R, AD5691R, AD5692R, AD5693, - AD5693R, AD5694, AD5694R, AD5695R, AD5696, and AD5696R Digital to - Analog converters. + Say yes here to build support for Analog Devices Voltage Output + Digital to Analog Converters: + - Single-channel: + AD5311R, AD5691R, AD5692R, AD5693, AD5693R + - Dual-channel: + AD5338R + - Quad-channel: + AD5694, AD5694R, AD5695R, AD5696, AD5696R + - 8-channel: + AD5671R, AD5675R + - 16-channel: + AD5673R, AD5677R To compile this driver as a module, choose M here: the module will be called ad5696. diff --git a/drivers/iio/dac/ad5686-spi.c b/drivers/iio/dac/ad5686-spi.c index 227ddb269669..2689d66c7c20 100644 --- a/drivers/iio/dac/ad5686-spi.c +++ b/drivers/iio/dac/ad5686-spi.c @@ -1,9 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* - * AD5672R, AD5674R, AD5676, AD5676R, AD5679R, - * AD5681R, AD5682R, AD5683, AD5683R, AD5684, - * AD5684R, AD5685R, AD5686, AD5686R - * Digital to analog converters driver + * SPI driver for AD5686 and similar Digital to Analog Converters * * Copyright 2018 Analog Devices Inc. */ diff --git a/drivers/iio/dac/ad5686.c b/drivers/iio/dac/ad5686.c index 873dfb5b9107..e2beba6d54b1 100644 --- a/drivers/iio/dac/ad5686.c +++ b/drivers/iio/dac/ad5686.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* - * AD5686R, AD5685R, AD5684R Digital to analog converters driver + * Core driver for AD5686 and similar Digital to Analog Converters * * Copyright 2011 Analog Devices Inc. */ diff --git a/drivers/iio/dac/ad5696-i2c.c b/drivers/iio/dac/ad5696-i2c.c index 4ddf2e151d47..4a249f9cdb8f 100644 --- a/drivers/iio/dac/ad5696-i2c.c +++ b/drivers/iio/dac/ad5696-i2c.c @@ -1,8 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* - * AD5338R, AD5671R, AD5673R, AD5675R, AD5677R, AD5691R, AD5692R, AD5693, - * AD5693R, AD5694, AD5694R, AD5695R, AD5696, AD5696R - * Digital to analog converters driver + * I2C driver for AD5696 and similar Digital to Analog Converters * * Copyright 2018 Analog Devices Inc. */ -- 2.43.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2 3/6] iio: dac: ad5686: refactor device list and file header comments 2026-07-24 12:03 ` [PATCH v2 3/6] iio: dac: ad5686: refactor device list and file header comments Rodrigo Alencar via B4 Relay @ 2026-07-24 12:16 ` sashiko-bot 0 siblings, 0 replies; 10+ messages in thread From: sashiko-bot @ 2026-07-24 12:16 UTC (permalink / raw) To: Rodrigo Alencar; +Cc: robh, conor+dt, devicetree Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] Incomplete implementation of device removal: AD5337R is left in ID tables despite commit message claim. -- --- Patch [3]: [PATCH v2 3/6] iio: dac: ad5686: refactor device list and file header comments --- commit f78bcff1ca70cede516f95f60a18e8d26ad243b8 Author: Rodrigo Alencar <rodrigo.alencar@analog.com> iio: dac: ad5686: refactor device list and file header comments This commit refactors the Kconfig device list by sorting devices by channel count and removes device descriptions from the file headers. It also states in the commit message that AD5337R is being omitted. > AD5337R is ommited as it does not seem to exist, i.e. its documentation could not be found. [Severity: Medium] Is the removal of AD5337R incomplete in this patch? The commit message notes that AD5337R is omitted, and it was removed from the Kconfig text, but the driver still registers the device. For example, it remains in the i2c_device_id table: drivers/iio/dac/ad5696-i2c.c:ad5686_i2c_id[] = { ... { .name = "ad5337r", .driver_data = (kernel_ulong_t)&ad5337r_chip_info }, ... } It also remains in the of_device_id table in the same file: drivers/iio/dac/ad5696-i2c.c:ad5686_of_match[] = { ... { .compatible = "adi,ad5337r", .data = &ad5337r_chip_info }, ... } The core driver also still exports its chip info structure: drivers/iio/dac/ad5686.c: const struct ad5686_chip_info ad5337r_chip_info = { .channels = ad5337r_channels, .int_vref_mv = 2500, .num_channels = 2, .regmap_type = AD5686_REGMAP, }; EXPORT_SYMBOL_NS_GPL(ad5337r_chip_info, "IIO_AD5686"); Should these entries be removed as well to fully drop the device support? -- Sashiko AI review · https://sashiko.dev/#/patchset/20260724-ad5686-extend-dev-support-v2-0-cfc2b30ce988@analog.com?part=3 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 4/6] dt-bindings: iio: dac: ad5696: extend device support 2026-07-24 12:03 [PATCH v2 0/6] iio: dac: ad5686: extend device support Rodrigo Alencar via B4 Relay ` (2 preceding siblings ...) 2026-07-24 12:03 ` [PATCH v2 3/6] iio: dac: ad5686: refactor device list and file header comments Rodrigo Alencar via B4 Relay @ 2026-07-24 12:03 ` Rodrigo Alencar via B4 Relay 2026-07-24 12:17 ` sashiko-bot 2026-07-24 12:03 ` [PATCH v2 5/6] dt-bindings: iio: dac: ad5686: " Rodrigo Alencar via B4 Relay 2026-07-24 12:03 ` [PATCH v2 6/6] iio: dac: ad5686: extend device support with new parts Rodrigo Alencar via B4 Relay 5 siblings, 1 reply; 10+ messages in thread From: Rodrigo Alencar via B4 Relay @ 2026-07-24 12:03 UTC (permalink / raw) To: Michael Auchter, linux, linux-iio, devicetree, linux-kernel Cc: Michael Hennerich, Jonathan Cameron, David Lechner, Andy Shevchenko, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Rodrigo Alencar From: Rodrigo Alencar <rodrigo.alencar@analog.com> Add support for AD5316R, AD5675 and AD5697R. These devices have different bit resolutions or different number of channels so no fallback compatibles are used. Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com> --- Documentation/devicetree/bindings/iio/dac/adi,ad5696.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5696.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5696.yaml index 5a93edc976f0..835fa21c474e 100644 --- a/Documentation/devicetree/bindings/iio/dac/adi,ad5696.yaml +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5696.yaml @@ -16,10 +16,12 @@ properties: compatible: enum: - adi,ad5311r + - adi,ad5316r - adi,ad5337r - adi,ad5338r - adi,ad5671r - adi,ad5673r + - adi,ad5675 - adi,ad5675r - adi,ad5677r - adi,ad5691r @@ -31,6 +33,7 @@ properties: - adi,ad5695r - adi,ad5696 - adi,ad5696r + - adi,ad5697r reg: maxItems: 1 @@ -86,6 +89,7 @@ allOf: compatible: contains: enum: + - adi,ad5675 - adi,ad5693 - adi,ad5694 - adi,ad5696 -- 2.43.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2 4/6] dt-bindings: iio: dac: ad5696: extend device support 2026-07-24 12:03 ` [PATCH v2 4/6] dt-bindings: iio: dac: ad5696: extend device support Rodrigo Alencar via B4 Relay @ 2026-07-24 12:17 ` sashiko-bot 0 siblings, 0 replies; 10+ messages in thread From: sashiko-bot @ 2026-07-24 12:17 UTC (permalink / raw) To: Rodrigo Alencar; +Cc: robh, conor+dt, devicetree Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] Missing driver implementation for newly added compatible strings. -- --- Patch [4]: [PATCH v2 4/6] dt-bindings: iio: dac: ad5696: extend device support --- commit 4e58650f8c4c07db88580b9ce728f26ca5b2ce81 Author: Rodrigo Alencar <rodrigo.alencar@analog.com> dt-bindings: iio: dac: ad5696: extend device support This commit updates the AD5696 DAC device tree bindings to include the AD5316R, AD5675, and AD5697R devices. It specifically notes that no fallback compatibles are used due to differing bit resolutions and channel counts. > diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5696.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5696.yaml > --- a/Documentation/devicetree/bindings/iio/dac/adi,ad5696.yaml > +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5696.yaml > @@ -16,10 +16,12 @@ properties: > compatible: > enum: > - adi,ad5311r > + - adi,ad5316r [Severity: Medium] Are there driver changes intended to be paired with this binding update? The commit message states that no fallback compatibles are used, meaning the driver needs an exact match to bind. However, looking at the driver source, the entries for these new compatible strings appear to be missing: drivers/iio/dac/ad5696-i2c.c:ad5686_of_match[] { /* Missing entries for adi,ad5316r, adi,ad5675, and adi,ad5697r */ }; Will this prevent the newly added devices from successfully probing, since the driver core won't find a matching driver to bind against when parsing the device tree? [ ... ] -- Sashiko AI review · https://sashiko.dev/#/patchset/20260724-ad5686-extend-dev-support-v2-0-cfc2b30ce988@analog.com?part=4 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 5/6] dt-bindings: iio: dac: ad5686: extend device support 2026-07-24 12:03 [PATCH v2 0/6] iio: dac: ad5686: extend device support Rodrigo Alencar via B4 Relay ` (3 preceding siblings ...) 2026-07-24 12:03 ` [PATCH v2 4/6] dt-bindings: iio: dac: ad5696: extend device support Rodrigo Alencar via B4 Relay @ 2026-07-24 12:03 ` Rodrigo Alencar via B4 Relay 2026-07-24 12:03 ` [PATCH v2 6/6] iio: dac: ad5686: extend device support with new parts Rodrigo Alencar via B4 Relay 5 siblings, 0 replies; 10+ messages in thread From: Rodrigo Alencar via B4 Relay @ 2026-07-24 12:03 UTC (permalink / raw) To: Michael Auchter, linux, linux-iio, devicetree, linux-kernel Cc: Michael Hennerich, Jonathan Cameron, David Lechner, Andy Shevchenko, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Rodrigo Alencar, Conor Dooley From: Rodrigo Alencar <rodrigo.alencar@analog.com> Add compatible entries for AD5313R, AD5317R, AD5674, AD5679, AD5687, AD5687R, AD5689, AD5689R. These devices have unique combination of channel count, bit resolution and supported command set, so that fallback compatibles are not used. Also, a small copy-and-paste error is fixed to the title field. Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com> --- Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml index 02e8c78e36d3..d1bb09054440 100644 --- a/Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml @@ -4,7 +4,7 @@ $id: http://devicetree.org/schemas/iio/dac/adi,ad5686.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Analog Devices AD5360 and similar SPI DACs +title: Analog Devices AD5686 and similar SPI DACs maintainers: - Michael Hennerich <michael.hennerich@analog.com> @@ -14,10 +14,14 @@ properties: compatible: enum: - adi,ad5310r + - adi,ad5313r + - adi,ad5317r - adi,ad5672r + - adi,ad5674 - adi,ad5674r - adi,ad5676 - adi,ad5676r + - adi,ad5679 - adi,ad5679r - adi,ad5681r - adi,ad5682r @@ -28,6 +32,10 @@ properties: - adi,ad5685r - adi,ad5686 - adi,ad5686r + - adi,ad5687 + - adi,ad5687r + - adi,ad5689 + - adi,ad5689r reg: maxItems: 1 @@ -84,10 +92,14 @@ allOf: compatible: contains: enum: + - adi,ad5674 - adi,ad5676 + - adi,ad5679 - adi,ad5683 - adi,ad5684 - adi,ad5686 + - adi,ad5687 + - adi,ad5689 then: required: - vref-supply -- 2.43.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 6/6] iio: dac: ad5686: extend device support with new parts 2026-07-24 12:03 [PATCH v2 0/6] iio: dac: ad5686: extend device support Rodrigo Alencar via B4 Relay ` (4 preceding siblings ...) 2026-07-24 12:03 ` [PATCH v2 5/6] dt-bindings: iio: dac: ad5686: " Rodrigo Alencar via B4 Relay @ 2026-07-24 12:03 ` Rodrigo Alencar via B4 Relay 5 siblings, 0 replies; 10+ messages in thread From: Rodrigo Alencar via B4 Relay @ 2026-07-24 12:03 UTC (permalink / raw) To: Michael Auchter, linux, linux-iio, devicetree, linux-kernel Cc: Michael Hennerich, Jonathan Cameron, David Lechner, Andy Shevchenko, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Rodrigo Alencar From: Rodrigo Alencar <rodrigo.alencar@analog.com> Add support for AD5313R, AD5317R, AD5674, AD5679, AD5687, AD5687R, AD5689, AD5689R to the AD5686 SPI driver. Also adding support for AD5316R, AD5675, AD5697R to the AD5696 I2C driver. This includes the creation of seven chip info struct instances and reuse of existing ones. Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com> --- drivers/iio/dac/Kconfig | 12 ++++++---- drivers/iio/dac/ad5686-spi.c | 16 +++++++++++++ drivers/iio/dac/ad5686.c | 55 ++++++++++++++++++++++++++++++++++++++++++++ drivers/iio/dac/ad5686.h | 7 ++++++ drivers/iio/dac/ad5696-i2c.c | 6 +++++ 5 files changed, 91 insertions(+), 5 deletions(-) diff --git a/drivers/iio/dac/Kconfig b/drivers/iio/dac/Kconfig index 3ae997939ff5..18a27785e28b 100644 --- a/drivers/iio/dac/Kconfig +++ b/drivers/iio/dac/Kconfig @@ -255,12 +255,14 @@ config AD5686_SPI Digital to Analog Converters: - Single-channel: AD5310R, AD5681R, AD5682R, AD5683, AD5683R + - Dual-channel: + AD5313R, AD5687, AD5687R, AD5689, AD5689R - Quad-channel: - AD5684, AD5684R, AD5685R, AD5686, AD5686R + AD5317R, AD5684, AD5684R, AD5685R, AD5686, AD5686R - 8-channel: AD5672R, AD5676, AD5676R - 16-channel: - AD5674R, AD5679R + AD5674, AD5674R, AD5679, AD5679R To compile this driver as a module, choose M here: the module will be called ad5686. @@ -275,11 +277,11 @@ config AD5696_I2C - Single-channel: AD5311R, AD5691R, AD5692R, AD5693, AD5693R - Dual-channel: - AD5338R + AD5338R, AD5697R - Quad-channel: - AD5694, AD5694R, AD5695R, AD5696, AD5696R + AD5316R, AD5694, AD5694R, AD5695R, AD5696, AD5696R - 8-channel: - AD5671R, AD5675R + AD5671R, AD5675, AD5675R - 16-channel: AD5673R, AD5677R diff --git a/drivers/iio/dac/ad5686-spi.c b/drivers/iio/dac/ad5686-spi.c index 2689d66c7c20..2a09b448acd4 100644 --- a/drivers/iio/dac/ad5686-spi.c +++ b/drivers/iio/dac/ad5686-spi.c @@ -175,10 +175,14 @@ static int ad5686_spi_probe(struct spi_device *spi) static const struct spi_device_id ad5686_spi_id[] = { { .name = "ad5310r", .driver_data = (kernel_ulong_t)&ad5310r_chip_info }, + { .name = "ad5313r", .driver_data = (kernel_ulong_t)&ad5338r_chip_info }, + { .name = "ad5317r", .driver_data = (kernel_ulong_t)&ad5317r_chip_info }, { .name = "ad5672r", .driver_data = (kernel_ulong_t)&ad5672r_chip_info }, + { .name = "ad5674", .driver_data = (kernel_ulong_t)&ad5674_chip_info }, { .name = "ad5674r", .driver_data = (kernel_ulong_t)&ad5674r_chip_info }, { .name = "ad5676", .driver_data = (kernel_ulong_t)&ad5676_chip_info }, { .name = "ad5676r", .driver_data = (kernel_ulong_t)&ad5676r_chip_info }, + { .name = "ad5679", .driver_data = (kernel_ulong_t)&ad5679_chip_info }, { .name = "ad5679r", .driver_data = (kernel_ulong_t)&ad5679r_chip_info }, { .name = "ad5681r", .driver_data = (kernel_ulong_t)&ad5681r_chip_info }, { .name = "ad5682r", .driver_data = (kernel_ulong_t)&ad5682r_chip_info }, @@ -190,16 +194,24 @@ static const struct spi_device_id ad5686_spi_id[] = { { .name = "ad5685r", .driver_data = (kernel_ulong_t)&ad5685r_chip_info }, { .name = "ad5686", .driver_data = (kernel_ulong_t)&ad5686_chip_info }, { .name = "ad5686r", .driver_data = (kernel_ulong_t)&ad5686r_chip_info }, + { .name = "ad5687", .driver_data = (kernel_ulong_t)&ad5687_chip_info }, + { .name = "ad5687r", .driver_data = (kernel_ulong_t)&ad5687r_chip_info }, + { .name = "ad5689", .driver_data = (kernel_ulong_t)&ad5689_chip_info }, + { .name = "ad5689r", .driver_data = (kernel_ulong_t)&ad5689r_chip_info }, { } }; MODULE_DEVICE_TABLE(spi, ad5686_spi_id); static const struct of_device_id ad5686_of_match[] = { { .compatible = "adi,ad5310r", .data = &ad5310r_chip_info }, + { .compatible = "adi,ad5313r", .data = &ad5338r_chip_info }, + { .compatible = "adi,ad5317r", .data = &ad5317r_chip_info }, { .compatible = "adi,ad5672r", .data = &ad5672r_chip_info }, + { .compatible = "adi,ad5674", .data = &ad5674_chip_info }, { .compatible = "adi,ad5674r", .data = &ad5674r_chip_info }, { .compatible = "adi,ad5676", .data = &ad5676_chip_info }, { .compatible = "adi,ad5676r", .data = &ad5676r_chip_info }, + { .compatible = "adi,ad5679", .data = &ad5679_chip_info }, { .compatible = "adi,ad5679r", .data = &ad5679r_chip_info }, { .compatible = "adi,ad5681r", .data = &ad5681r_chip_info }, { .compatible = "adi,ad5682r", .data = &ad5682r_chip_info }, @@ -210,6 +222,10 @@ static const struct of_device_id ad5686_of_match[] = { { .compatible = "adi,ad5685r", .data = &ad5685r_chip_info }, { .compatible = "adi,ad5686", .data = &ad5686_chip_info }, { .compatible = "adi,ad5686r", .data = &ad5686r_chip_info }, + { .compatible = "adi,ad5687", .data = &ad5687_chip_info }, + { .compatible = "adi,ad5687r", .data = &ad5687r_chip_info }, + { .compatible = "adi,ad5689", .data = &ad5689_chip_info }, + { .compatible = "adi,ad5689r", .data = &ad5689r_chip_info }, { } }; MODULE_DEVICE_TABLE(of, ad5686_of_match); diff --git a/drivers/iio/dac/ad5686.c b/drivers/iio/dac/ad5686.c index e2beba6d54b1..0cc1c9c22a28 100644 --- a/drivers/iio/dac/ad5686.c +++ b/drivers/iio/dac/ad5686.c @@ -409,8 +409,11 @@ DECLARE_AD5683_CHANNELS(ad5683r_channels, 16, 0); /* dual-channel */ DECLARE_AD5338_CHANNELS(ad5337r_channels, 8, 8); DECLARE_AD5338_CHANNELS(ad5338r_channels, 10, 6); +DECLARE_AD5338_CHANNELS(ad5687r_channels, 12, 4); +DECLARE_AD5338_CHANNELS(ad5689r_channels, 16, 0); /* quad-channel */ +DECLARE_AD5686_CHANNELS(ad5317r_channels, 10, 6); DECLARE_AD5686_CHANNELS(ad5684r_channels, 12, 4); DECLARE_AD5686_CHANNELS(ad5685r_channels, 14, 2); DECLARE_AD5686_CHANNELS(ad5686r_channels, 16, 0); @@ -486,6 +489,44 @@ const struct ad5686_chip_info ad5338r_chip_info = { }; EXPORT_SYMBOL_NS_GPL(ad5338r_chip_info, "IIO_AD5686"); +const struct ad5686_chip_info ad5687_chip_info = { + .channels = ad5687r_channels, + .num_channels = 2, + .regmap_type = AD5686_REGMAP, +}; +EXPORT_SYMBOL_NS_GPL(ad5687_chip_info, "IIO_AD5686"); + +const struct ad5686_chip_info ad5687r_chip_info = { + .channels = ad5687r_channels, + .int_vref_mv = 2500, + .num_channels = 2, + .regmap_type = AD5686_REGMAP, +}; +EXPORT_SYMBOL_NS_GPL(ad5687r_chip_info, "IIO_AD5686"); + +const struct ad5686_chip_info ad5689_chip_info = { + .channels = ad5689r_channels, + .num_channels = 2, + .regmap_type = AD5686_REGMAP, +}; +EXPORT_SYMBOL_NS_GPL(ad5689_chip_info, "IIO_AD5686"); + +const struct ad5686_chip_info ad5689r_chip_info = { + .channels = ad5689r_channels, + .int_vref_mv = 2500, + .num_channels = 2, + .regmap_type = AD5686_REGMAP, +}; +EXPORT_SYMBOL_NS_GPL(ad5689r_chip_info, "IIO_AD5686"); + +const struct ad5686_chip_info ad5317r_chip_info = { + .channels = ad5317r_channels, + .int_vref_mv = 2500, + .num_channels = 4, + .regmap_type = AD5686_REGMAP, +}; +EXPORT_SYMBOL_NS_GPL(ad5317r_chip_info, "IIO_AD5686"); + const struct ad5686_chip_info ad5684_chip_info = { .channels = ad5684r_channels, .num_channels = 4, @@ -547,6 +588,13 @@ const struct ad5686_chip_info ad5676r_chip_info = { }; EXPORT_SYMBOL_NS_GPL(ad5676r_chip_info, "IIO_AD5686"); +const struct ad5686_chip_info ad5674_chip_info = { + .channels = ad5674r_channels, + .num_channels = 16, + .regmap_type = AD5686_REGMAP, +}; +EXPORT_SYMBOL_NS_GPL(ad5674_chip_info, "IIO_AD5686"); + const struct ad5686_chip_info ad5674r_chip_info = { .channels = ad5674r_channels, .int_vref_mv = 2500, @@ -555,6 +603,13 @@ const struct ad5686_chip_info ad5674r_chip_info = { }; EXPORT_SYMBOL_NS_GPL(ad5674r_chip_info, "IIO_AD5686"); +const struct ad5686_chip_info ad5679_chip_info = { + .channels = ad5679r_channels, + .num_channels = 16, + .regmap_type = AD5686_REGMAP, +}; +EXPORT_SYMBOL_NS_GPL(ad5679_chip_info, "IIO_AD5686"); + const struct ad5686_chip_info ad5679r_chip_info = { .channels = ad5679r_channels, .int_vref_mv = 2500, diff --git a/drivers/iio/dac/ad5686.h b/drivers/iio/dac/ad5686.h index c1222ef83a4f..482bc70515f7 100644 --- a/drivers/iio/dac/ad5686.h +++ b/drivers/iio/dac/ad5686.h @@ -106,8 +106,13 @@ extern const struct ad5686_chip_info ad5683r_chip_info; /* dual-channel instances */ extern const struct ad5686_chip_info ad5337r_chip_info; extern const struct ad5686_chip_info ad5338r_chip_info; +extern const struct ad5686_chip_info ad5687_chip_info; +extern const struct ad5686_chip_info ad5687r_chip_info; +extern const struct ad5686_chip_info ad5689_chip_info; +extern const struct ad5686_chip_info ad5689r_chip_info; /* quad-channel instances */ +extern const struct ad5686_chip_info ad5317r_chip_info; extern const struct ad5686_chip_info ad5684_chip_info; extern const struct ad5686_chip_info ad5684r_chip_info; extern const struct ad5686_chip_info ad5685r_chip_info; @@ -120,7 +125,9 @@ extern const struct ad5686_chip_info ad5676_chip_info; extern const struct ad5686_chip_info ad5676r_chip_info; /* 16-channel instances */ +extern const struct ad5686_chip_info ad5674_chip_info; extern const struct ad5686_chip_info ad5674r_chip_info; +extern const struct ad5686_chip_info ad5679_chip_info; extern const struct ad5686_chip_info ad5679r_chip_info; /** diff --git a/drivers/iio/dac/ad5696-i2c.c b/drivers/iio/dac/ad5696-i2c.c index 4a249f9cdb8f..bffe60452c34 100644 --- a/drivers/iio/dac/ad5696-i2c.c +++ b/drivers/iio/dac/ad5696-i2c.c @@ -78,10 +78,12 @@ static int ad5686_i2c_probe(struct i2c_client *i2c) static const struct i2c_device_id ad5686_i2c_id[] = { { .name = "ad5311r", .driver_data = (kernel_ulong_t)&ad5311r_chip_info }, + { .name = "ad5316r", .driver_data = (kernel_ulong_t)&ad5317r_chip_info }, { .name = "ad5337r", .driver_data = (kernel_ulong_t)&ad5337r_chip_info }, { .name = "ad5338r", .driver_data = (kernel_ulong_t)&ad5338r_chip_info }, { .name = "ad5671r", .driver_data = (kernel_ulong_t)&ad5672r_chip_info }, { .name = "ad5673r", .driver_data = (kernel_ulong_t)&ad5674r_chip_info }, + { .name = "ad5675", .driver_data = (kernel_ulong_t)&ad5676_chip_info }, { .name = "ad5675r", .driver_data = (kernel_ulong_t)&ad5676r_chip_info }, { .name = "ad5677r", .driver_data = (kernel_ulong_t)&ad5679r_chip_info }, { .name = "ad5691r", .driver_data = (kernel_ulong_t)&ad5681r_chip_info }, @@ -93,16 +95,19 @@ static const struct i2c_device_id ad5686_i2c_id[] = { { .name = "ad5695r", .driver_data = (kernel_ulong_t)&ad5685r_chip_info }, { .name = "ad5696", .driver_data = (kernel_ulong_t)&ad5686_chip_info }, { .name = "ad5696r", .driver_data = (kernel_ulong_t)&ad5686r_chip_info }, + { .name = "ad5697r", .driver_data = (kernel_ulong_t)&ad5687r_chip_info }, { } }; MODULE_DEVICE_TABLE(i2c, ad5686_i2c_id); static const struct of_device_id ad5686_of_match[] = { { .compatible = "adi,ad5311r", .data = &ad5311r_chip_info }, + { .compatible = "adi,ad5316r", .data = &ad5317r_chip_info }, { .compatible = "adi,ad5337r", .data = &ad5337r_chip_info }, { .compatible = "adi,ad5338r", .data = &ad5338r_chip_info }, { .compatible = "adi,ad5671r", .data = &ad5672r_chip_info }, { .compatible = "adi,ad5673r", .data = &ad5674r_chip_info }, + { .compatible = "adi,ad5675", .data = &ad5676_chip_info }, { .compatible = "adi,ad5675r", .data = &ad5676r_chip_info }, { .compatible = "adi,ad5677r", .data = &ad5679r_chip_info }, { .compatible = "adi,ad5691r", .data = &ad5681r_chip_info }, @@ -114,6 +119,7 @@ static const struct of_device_id ad5686_of_match[] = { { .compatible = "adi,ad5695r", .data = &ad5685r_chip_info }, { .compatible = "adi,ad5696", .data = &ad5686_chip_info }, { .compatible = "adi,ad5696r", .data = &ad5686r_chip_info }, + { .compatible = "adi,ad5697r", .data = &ad5687r_chip_info }, { } }; MODULE_DEVICE_TABLE(of, ad5686_of_match); -- 2.43.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
end of thread, other threads:[~2026-07-24 12:18 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-07-24 12:03 [PATCH v2 0/6] iio: dac: ad5686: extend device support Rodrigo Alencar via B4 Relay 2026-07-24 12:03 ` [PATCH v2 1/6] dt-bindings: iio: dac: ad5696: add AD5673R/AD5677R support Rodrigo Alencar via B4 Relay 2026-07-24 12:18 ` sashiko-bot 2026-07-24 12:03 ` [PATCH v2 2/6] iio: dac: ad5696: add AD5673R/AD5677R entries to of_match table Rodrigo Alencar via B4 Relay 2026-07-24 12:03 ` [PATCH v2 3/6] iio: dac: ad5686: refactor device list and file header comments Rodrigo Alencar via B4 Relay 2026-07-24 12:16 ` sashiko-bot 2026-07-24 12:03 ` [PATCH v2 4/6] dt-bindings: iio: dac: ad5696: extend device support Rodrigo Alencar via B4 Relay 2026-07-24 12:17 ` sashiko-bot 2026-07-24 12:03 ` [PATCH v2 5/6] dt-bindings: iio: dac: ad5686: " Rodrigo Alencar via B4 Relay 2026-07-24 12:03 ` [PATCH v2 6/6] iio: dac: ad5686: extend device support with new parts Rodrigo Alencar via B4 Relay
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox