iio: dac: ltc2632: add support for LTC2654 DAC family
Subsystems (2)
cover iio: dac: ltc2632: add support for LTC2654 DAC family
This patch series adds support for the Linear Technology LTC2654 quad DAC family to the existing ltc2632 driver.
The LTC2654 shares the same 24-bit SPI protocol as the existing LTC2632/2634/2636 devices, requiring minimal additions to the driver.
The LTC2654L-16 variant has been tested on a Phytec phyCORE-STM32MP1 board with the DAC connected via SPI1. The driver probes successfully and all 4 channels are accessible via the IIO sysfs interface.
Patch 1 adds the driver support.
Patch 2 updates the DT bindings documentation.
David Marinovic (2):
iio: dac: ltc2632: add support for LTC2654 DAC family
dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings
PATCH 1/2 iio: dac: ltc2632: add support for LTC2654 DAC family
Add support for the Linear Technology LTC2654 quad DAC family. The LTC2654 is a 4-channel, 16-/12-bit DAC with SPI interface, sharing the same 24-bit SPI protocol as the existing LTC2632/ LTC2634/LTC2636 devices supported by this driver.
Add support for the following variants:
- LTC2654L-16: 16-bit, 2.5V internal reference
- LTC2654L-12: 12-bit, 2.5V internal reference
- LTC2654H-16: 16-bit, 4.096V internal reference
- LTC2654H-12: 12-bit, 4.096V internal reference
--- drivers/iio/dac/ltc2632.c | 47 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-)
drivers/iio/dac/ltc2632.c +27 -2
@@ -67,6 +67,10 @@ enum ltc2632_supported_device_ids {ID_LTC2636H12 ,ID_LTC2636H10 ,ID_LTC2636H8 , +ID_LTC2654L16 , +ID_LTC2654L12 , +ID_LTC2654H16 , +ID_LTC2654H12 }; static int ltc2632_spi_write(struct spi_device *spi,
@@ -79,8 +83,8 @@ static int ltc2632_spi_write(struct spi_device *spi,* The input shift register is 24 bits wide. * The next four are the command bits, C3 to C0, * followed by the 4-bit DAC address, A3 to A0, and then the -* 12-, 10-, 8-bit data-word. The data-word comprises the 12-, -* 10-, 8-bit input code followed by 4, 6, or 8 don't care bits. +* 16-, 12-, 10-, 8-bit data-word. The data-word comprises the +* 16-, 12-, 10-, 8-bit input code followed by 0, 4, 6, or 8 don't care bits. */ data = (cmd <<20 ) | (addr <<16 ) | (val << shift);put_unaligned_be24 (data, &msg[0 ]);
@@ -206,6 +210,7 @@ static const struct iio_chan_spec_ext_info ltc2632_ext_info[] = { LTC2632_CHANNEL(7, _bits), \ } +static DECLARE_LTC2632_CHANNELS(ltc2632x16, 16); static DECLARE_LTC2632_CHANNELS(ltc2632x12, 12); static DECLARE_LTC2632_CHANNELS(ltc2632x10, 10); static DECLARE_LTC2632_CHANNELS(ltc2632x8, 8);
@@ -301,6 +306,26 @@ static const struct ltc2632_chip_info ltc2632_chip_info_tbl[] = { .num_channels = 8, .vref_mv = 4096, }, + [ID_LTC2654L16] = { + .channels = ltc2632x16_channels, + .num_channels = 4, + .vref_mv = 2500, + }, + [ID_LTC2654L12] = { + .channels = ltc2632x12_channels, + .num_channels = 4, + .vref_mv = 2500, + }, + [ID_LTC2654H16] = { + .channels = ltc2632x16_channels, + .num_channels = 4, + .vref_mv = 4096, + }, + [ID_LTC2654H12] = { + .channels = ltc2632x12_channels, + .num_channels = 4, + .vref_mv = 4096, + }, };static int ltc2632_probe (struct spi_device *spi)
@@ -372,6 +397,10 @@ static const struct spi_device_id ltc2632_id[] = { { "ltc2636-h12",
(kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2636H12] },
{ "ltc2636-h10",
(kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2636H10] },
{ "ltc2636-h8",
(kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2636H8] },
+ { "ltc2654-l16", (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2654L16] },
+ { "ltc2654-l12", (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2654L12] },
+ { "ltc2654-h16", (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2654H16] },
+ { "ltc2654-h12", (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2654H12] },
{ }
};
MODULE_DEVICE_TABLE(spi, ltc2632_id);
@@ -431,6 +460,18 @@ static const struct of_device_id ltc2632_of_match[] = {
}, {
.compatible = "lltc,ltc2636-h8",
.data = <c2632_chip_info_tbl[ID_LTC2636H8]+ }, {
+ .compatible = "lltc,ltc2654-l16",
+ .data = <c2632_chip_info_tbl[ID_LTC2654L16]
+ }, {
+ .compatible = "lltc,ltc2654-l12",
+ .data = <c2632_chip_info_tbl[ID_LTC2654L12]
+ }, {
+ .compatible = "lltc,ltc2654-h16",
+ .data = <c2632_chip_info_tbl[ID_LTC2654H16]
+ }, {
+ .compatible = "lltc,ltc2654-h12",
+ .data = <c2632_chip_info_tbl[ID_LTC2654H12]
},
{ } };
@@ -447,5 +488,5 @@ static struct spi_driver ltc2632_driver = {
module_spi_driver(ltc2632_driver);
MODULE_AUTHOR("Maxime Roussin-Belanger
<[email protected]>"); -MODULE_DESCRIPTION("LTC2632 DAC SPI driver"); +MODULE_DESCRIPTION("LTC2632/LTC2654 DAC SPI driver");
MODULE_LICENSE("GPL v2");
--
2.50.1
-------- Original Message --------
Subject: [PATCH 0/2] iio: dac: ltc2632: add support for LTC2654 DAC family
Date: 10.03.2026 16:27
From: David Marinović <[email protected]>
To: [email protected]
This patch series adds support for the Linear Technology LTC2654 quad DAC family to the existing ltc2632 driver.
The LTC2654 shares the same 24-bit SPI protocol as the existing LTC2632/2634/2636 devices, requiring minimal additions to the driver.
The LTC2654L-16 variant has been tested on a Phytec phyCORE-STM32MP1 board with the DAC connected via SPI1. The driver probes successfully and all 4 channels are accessible via the IIO sysfs interface.
Patch 1 adds the driver support.
Patch 2 updates the DT bindings documentation.
David Marinovic (2):
iio: dac: ltc2632: add support for LTC2654 DAC family
dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings
Quoted 11 lines · David Marinović
Add support for the Linear Technology LTC2654 quad DAC family. The LTC2654 is a 4-channel, 16-/12-bit DAC with SPI interface, sharing the same 24-bit SPI protocol as the existing LTC2632/ LTC2634/LTC2636 devices supported by this driver.
Add support for the following variants:
- LTC2654L-16: 16-bit, 2.5V internal reference
- LTC2654L-12: 12-bit, 2.5V internal reference
- LTC2654H-16: 16-bit, 4.096V internal reference
- LTC2654H-12: 12-bit, 4.096V internal reference
...
drivers/iio/dac/ltc2632.c enum ltc2632_supported_device_ids { · line 73
Quoted 9 lines
enum
ltc2632_supported_device_ids{ID_LTC2636H12, ID_LTC2636H10, ID_LTC2636H8,drivers/iio/dac/ltc2632.c +4
-0+ID_LTC2654L16 , +ID_LTC2654L12 , +ID_LTC2654H16 , +ID_LTC2654H12
You see how nicely the new IDs landed here, but after you it will require an unneeded churn.
Quoted 1 line
};
...
Quoted 16 lines
static const struct
spi_device_idltc2632_id[] = {{ "ltc2636-h12", (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2636H12] }, { "ltc2636-h10", (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2636H10] }, { "ltc2636-h8", (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2636H8] },+ { "ltc2654-l16",
(kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2654L16] },
+ { "ltc2654-l12",
(kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2654L12] },
+ { "ltc2654-h16",
(kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2654H16] },
+ { "ltc2654-h12",
(kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2654H12] },
Quoted 1 line
{ }Can we have a refactor patch to drop that enum and use separate chip_info static objects?
Quoted 1 line
};
...
Quoted 8 lines
static const struct
of_device_idltc2632_of_match[] = {}, { .compatible = "lltc,ltc2636-h8", .data = <c2632_chip_info_tbl[ID_LTC2636H8](quoted diff) +3
-0+ }, { + .compatible = "lltc,ltc2654-l16", + .data = <c2632_chip_info_tbl[ID_LTC2654L16]
Review
Quoted 10 lines
(quoted diff) +9
-0+ }, { + .compatible = "lltc,ltc2654-l12", + .data = <c2632_chip_info_tbl[ID_LTC2654L12] + }, { + .compatible = "lltc,ltc2654-h16", + .data = <c2632_chip_info_tbl[ID_LTC2654H16] + }, { + .compatible = "lltc,ltc2654-h12", + .data = <c2632_chip_info_tbl[ID_LTC2654H12] },
Ditto.
Quoted 2 lines
{ }};
...
Quoted 7 lines
Subject: [PATCH 0/2] iio: dac: ltc2632: add support for LTC2654 DAC family
Date: 10.03.2026 16:27
From: David Marinović <[email protected]>
To: [email protected]This patch series adds support for the Linear Technology LTC2654 quad DAC family to the existing ltc2632 driver.
Huh?!
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH 2/2 dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings
In reply to David MarinovićAdd DT compatible strings for the LTC2654 DAC family variants supported by the ltc2632 driver.
--- .../devicetree/bindings/iio/dac/lltc,ltc2632.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/iio/dac/lltc,ltc2632.yaml +2 -2
@@ -4,14 +4,15 @@ $id: http://devicetree.org/schemas/iio/dac/lltc,ltc2632.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Linear Technology LTC263x 12-/10-/8-Bit Rail-to-Rail DAC +title: Linear Technology LTC263x 12-/10-/8-Bit, LTC2654 16-/12-Bit, Rail-to-Rail DAC maintainers: - Michael Hennerich <[email protected]> description: | - Bindings for the Linear Technology LTC2632/2634/2636 DAC + Bindings for the Linear Technology LTC2632/2634/2636/2654 DAC Datasheet can be found here:
https://www.analog.com/media/en/technical-documentation/data-sheets/LTC263[246].pdf
+ Datasheet can be found here: https://www.analog.com/media/en/technical-documentation/data-sheets/2654f.pdf
properties:
compatible:
@@ -34,6 +35,10 @@ properties:
- lltc,ltc2636-h12
- lltc,ltc2636-h10
- lltc,ltc2636-h8
+ - lltc,ltc2654-l16 + - lltc,ltc2654-l12 + - lltc,ltc2654-h16 + - lltc,ltc2654-h12
reg:
maxItems: 1
--
2.50.1
-------- Original Message --------
Subject: [PATCH 0/2] iio: dac: ltc2632: add support for LTC2654 DAC family
Date: 10.03.2026 16:27
From: David Marinović <[email protected]>
To: [email protected]
This patch series adds support for the Linear Technology LTC2654 quad DAC family to the existing ltc2632 driver.
The LTC2654 shares the same 24-bit SPI protocol as the existing LTC2632/2634/2636 devices, requiring minimal additions to the driver.
The LTC2654L-16 variant has been tested on a Phytec phyCORE-STM32MP1 board with the DAC connected via SPI1. The driver probes successfully and all 4 channels are accessible via the IIO sysfs interface.
Patch 1 adds the driver support.
Patch 2 updates the DT bindings documentation.
David Marinovic (2):
iio: dac: ltc2632: add support for LTC2654 DAC family
dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings
Re: [PATCH 2/2] dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings
Quoted 2 lines · David Marinović
Add DT compatible strings for the LTC2654 DAC family variants supported by the ltc2632 driver.
Describe hardware, not driver.
Quoted 17 lines
Signed-off-by David Marinovic <[email protected]>--- .../devicetree/bindings/iio/dac/lltc,ltc2632.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)Documentation/devicetree/bindings/iio/dac/lltc,ltc2632.yaml +1
-1@@ -4,14 +4,15 @@ $id: http://devicetree.org/schemas/iio/dac/lltc,ltc2632.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Linear Technology LTC263x 12-/10-/8-Bit Rail-to-Rail DAC +title: Linear Technology LTC263x 12-/10-/8-Bit, LTC2654 16-/12-Bit,
Quoted 1 line
Rail-to-Rail DAC
There are multiple patch errors here. This is unmergeable.
Quoted 14 lines
maintainers:
- Michael Hennerich <[email protected]>description: |
Documentation/devicetree/bindings/iio/dac/lltc,ltc2632.yaml +2
-1- Bindings for the Linear Technology LTC2632/2634/2636 DAC + Bindings for the Linear Technology LTC2632/2634/2636/2654 DAC Datasheet can be found here: https://www.analog.com/media/en/technical-documentation/data-sheets/LTC263[246].pdf + Datasheet can be found here:https://www.analog.com/media/en/technical-documentation/data-sheets/2654f.pdf
properties:
compatible:
Documentation/devicetree/bindings/iio/dac/lltc,ltc2632.yaml properties: · line 41
Quoted 7 lines
Documentation/devicetree/bindings/iio/dac/lltc,ltc2632.yaml +4
-0@@ -34,6 +35,10 @@ properties: - lltc,ltc2636-h12 - lltc,ltc2636-h10 - lltc,ltc2636-h8 + - lltc,ltc2654-l16 + - lltc,ltc2654-l12 + - lltc,ltc2654-h16 + - lltc,ltc2654-h12
Several look compatible to me, so express it with fallback and drop unneeded entries in the driver.
Quoted 26 lines
Documentation/devicetree/bindings/iio/dac/lltc,ltc2632.yaml +0
-1reg: maxItems: 1 --2.50.1
-------- Original Message --------
Subject: [PATCH 0/2] iio: dac: ltc2632: add support for LTC2654 DAC family
Date: 10.03.2026 16:27
From: David Marinović <[email protected]>
To: [email protected]This patch series adds support for the Linear Technology LTC2654 quad DAC family to the existing ltc2632 driver.
The LTC2654 shares the same 24-bit SPI protocol as the existing LTC2632/2634/2636 devices, requiring minimal additions to the driver.
The LTC2654L-16 variant has been tested on a Phytec phyCORE-STM32MP1 board with the DAC connected via SPI1. The driver probes successfully and all 4 channels are accessible via the IIO sysfs interface.
Quoted 8 lines
Patch 1 adds the driver support.
Patch 2 updates the DT bindings documentation.David Marinovic (2):
iio: dac: ltc2632: add support for LTC2654 DAC family
dt-bindings: iio: dac: ltc2632: add LTC2654 compatible stringsSigned-off-by David Marinovic <[email protected]>
What is this?
Re: [PATCH 2/2] dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings
In reply to David MarinovićQuoted 8 lines · David Marinović
Add DT compatible strings for the LTC2654 DAC family variants supported by the ltc2632 driver.
Signed-off-by David Marinovic <[email protected]>--- .../devicetree/bindings/iio/dac/lltc,ltc2632.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
Please organize the patch documenting the compatible (DT bindings)
before the patch using that compatible.
See also: https://elixir.bootlin.com/linux/v6.14-rc6/source/Documentation/devicetree/bindings/submitting-patches.rst#L46
Please run scripts/checkpatch.pl on the patches and fix reported warnings. After that, run also 'scripts/checkpatch.pl --strict' on the patches and (probably) fix more warnings. Some warnings can be ignored, especially from --strict run, but the code here looks like it needs a fix. Feel free to get in touch if the warning is not clear.
Best regards,
Krzysztof
v2 cover iio: dac: ltc2632: add support for LTC2654 DAC family
In reply to David MarinovićFrom: David Marinovic <[email protected]>
Greetings!
I have mangled the first cover letter which may have caused confusion. It's my first time submitting a kernel patch so apologies in advanced.
This is v2 of the LTC2654 DAC support patch series, addressing review feedback from Andy Shevchenko and Krzysztof Kozlowski.
The LTC2654 is a quad-channel, 16-/12-bit DAC with internal reference voltage and SPI interface, sharing the same 24-bit SPI protocol as the LTC2632/2634/2636 family.
The LTC2654L-16 variant has been tested on a Phytec phyCORE-STM32MP1 board with the DAC connected via SPI1. The driver probes successfully and all 4 channels are accessible via the IIO sysfs interface.
Changes in v2:
- Added refactor patch dropping the enum and using individual chip_info objects as requested by Andy Shevchenko
- DT bindings patch now comes before the driver patch
- DT bindings commit message now describes hardware not driver
- DT bindings patch tested with make dt_binding_check and scripts/checkpatch.pl --strict with no errors or warnings
Question for Krzysztof Kozlowski. You mentioned "Several look compatible to me, so express it with fallback and drop unneeded entries in the driver." Does this mean a complete refactor of the existing entries?
David Marinovic (3):
iio: dac: ltc2632: drop enum and use individual chip_info objects
dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings
iio: dac: ltc2632: add support for LTC2654 DAC family
.../bindings/iio/dac/lltc,ltc2632.yaml | 12 +- drivers/iio/dac/ltc2632.c | 367 +++++++++--------- 2 files changed, 188 insertions(+), 191 deletions(-)
Signature · 1 line
2.50.1
PATCH v2 1/3 iio: dac: ltc2632: drop enum and use individual chip_info objects
From: David Marinovic <[email protected]>
Remove the ltc2632_chip_info_tbl[] array and related ltc2632_supported_device_ids enum used for looking up chip-specific information. Instead, use separate static const struct ltc2632_chip_info objects for each supported chip variant.
--- drivers/iio/dac/ltc2632.c | 327 +++++++++++++++++--------------------- 1 file changed, 142 insertions(+), 185 deletions(-)
drivers/iio/dac/ltc2632.c +142 -185
@@ -48,27 +48,6 @@ struct ltc2632_state {int vref_mv; }; -enum ltc2632_supported_device_ids { -ID_LTC2632L12 , -ID_LTC2632L10 , -ID_LTC2632L8 , -ID_LTC2632H12 , -ID_LTC2632H10 , -ID_LTC2632H8 , -ID_LTC2634L12 , -ID_LTC2634L10 , -ID_LTC2634L8 , -ID_LTC2634H12 , -ID_LTC2634H10 , -ID_LTC2634H8 , -ID_LTC2636L12 , -ID_LTC2636L10 , -ID_LTC2636L8 , -ID_LTC2636H12 , -ID_LTC2636H10 , -ID_LTC2636H8 , -}; -static int ltc2632_spi_write (struct spi_device *spi,u8 cmd,u8 addr,u16 val,u8 shift) {
@@ -210,97 +189,112 @@ static DECLARE_LTC2632_CHANNELS(ltc2632x12, 12); static DECLARE_LTC2632_CHANNELS(ltc2632x10, 10); static DECLARE_LTC2632_CHANNELS(ltc2632x8, 8); -static const struct ltc2632_chip_info ltc2632_chip_info_tbl[] = { - [ID_LTC2632L12 ] = { - .channels = ltc2632x12_channels, - .num_channels =2 , - .vref_mv =2500 , - }, - [ID_LTC2632L10 ] = { - .channels = ltc2632x10_channels, - .num_channels =2 , - .vref_mv =2500 , - }, - [ID_LTC2632L8 ] = { - .channels = ltc2632x8_channels, - .num_channels =2 , - .vref_mv =2500 , - }, - [ID_LTC2632H12 ] = { - .channels = ltc2632x12_channels, - .num_channels =2 , - .vref_mv =4096 , - }, - [ID_LTC2632H10 ] = { - .channels = ltc2632x10_channels, - .num_channels =2 , - .vref_mv =4096 , - }, - [ID_LTC2632H8 ] = { - .channels = ltc2632x8_channels, - .num_channels =2 , - .vref_mv =4096 , - }, - [ID_LTC2634L12 ] = { - .channels = ltc2632x12_channels, - .num_channels =4 , - .vref_mv =2500 , - }, - [ID_LTC2634L10 ] = { - .channels = ltc2632x10_channels, - .num_channels =4 , - .vref_mv =2500 , - }, - [ID_LTC2634L8 ] = { - .channels = ltc2632x8_channels, - .num_channels =4 , - .vref_mv =2500 , - }, - [ID_LTC2634H12 ] = { - .channels = ltc2632x12_channels, - .num_channels =4 , - .vref_mv =4096 , - }, - [ID_LTC2634H10 ] = { - .channels = ltc2632x10_channels, - .num_channels =4 , - .vref_mv =4096 , - }, - [ID_LTC2634H8 ] = { - .channels = ltc2632x8_channels, - .num_channels =4 , - .vref_mv =4096 , - }, - [ID_LTC2636L12 ] = { - .channels = ltc2632x12_channels, - .num_channels =8 , - .vref_mv =2500 , - }, - [ID_LTC2636L10 ] = { - .channels = ltc2632x10_channels, - .num_channels =8 , - .vref_mv =2500 , - }, - [ID_LTC2636L8 ] = { - .channels = ltc2632x8_channels, - .num_channels =8 , - .vref_mv =2500 , - }, - [ID_LTC2636H12 ] = { - .channels = ltc2632x12_channels, - .num_channels =8 , - .vref_mv =4096 , - }, - [ID_LTC2636H10 ] = { - .channels = ltc2632x10_channels, - .num_channels =8 , - .vref_mv =4096 , - }, - [ID_LTC2636H8 ] = { - .channels = ltc2632x8_channels, - .num_channels =8 , - .vref_mv =4096 , - }, +static const struct ltc2632_chip_info ltc2632l12_chip_info = { + .channels = ltc2632x12_channels, + .num_channels =2 , + .vref_mv =2500 , +}; + +static const struct ltc2632_chip_info ltc2632l10_chip_info = { + .channels = ltc2632x10_channels, + .num_channels =2 , + .vref_mv =2500 , +}; + +static const struct ltc2632_chip_info ltc2632l8_chip_info = { + .channels = ltc2632x8_channels, + .num_channels =2 , + .vref_mv =2500 , +}; + +static const struct ltc2632_chip_info ltc2632h12_chip_info = { + .channels = ltc2632x12_channels, + .num_channels =2 , + .vref_mv =4096 , +}; + +static const struct ltc2632_chip_info ltc2632h10_chip_info = { + .channels = ltc2632x10_channels, + .num_channels =2 , + .vref_mv =4096 , +}; + +static const struct ltc2632_chip_info ltc2632h8_chip_info = { + .channels = ltc2632x8_channels, + .num_channels =2 , + .vref_mv =4096 , +}; + +static const struct ltc2632_chip_info ltc2634l12_chip_info = { + .channels = ltc2632x12_channels, + .num_channels =4 , + .vref_mv =2500 , +}; + +static const struct ltc2632_chip_info ltc2634l10_chip_info = { + .channels = ltc2632x10_channels, + .num_channels =4 , + .vref_mv =2500 , +}; + +static const struct ltc2632_chip_info ltc2634l8_chip_info = { + .channels = ltc2632x8_channels, + .num_channels =4 , + .vref_mv =2500 , +}; + +static const struct ltc2632_chip_info ltc2634h12_chip_info = { + .channels = ltc2632x12_channels, + .num_channels =4 , + .vref_mv =4096 , +}; + +static const struct ltc2632_chip_info ltc2634h10_chip_info = { + .channels = ltc2632x10_channels, + .num_channels =4 , + .vref_mv =4096 , +}; + +static const struct ltc2632_chip_info ltc2634h8_chip_info = { + .channels = ltc2632x8_channels, + .num_channels =4 , + .vref_mv =4096 , +}; + +static const struct ltc2632_chip_info ltc2636l12_chip_info = { + .channels = ltc2632x12_channels, + .num_channels =8 , + .vref_mv =2500 , +}; + +static const struct ltc2632_chip_info ltc2636l10_chip_info = { + .channels = ltc2632x10_channels, + .num_channels =8 , + .vref_mv =2500 , +}; + +static const struct ltc2632_chip_info ltc2636l8_chip_info = { + .channels = ltc2632x8_channels, + .num_channels =8 , + .vref_mv =2500 , +}; + +static const struct ltc2632_chip_info ltc2636h12_chip_info = { + .channels = ltc2632x12_channels, + .num_channels =8 , + .vref_mv =4096 , +}; + +static const struct ltc2632_chip_info ltc2636h10_chip_info = { + .channels = ltc2632x10_channels, + .num_channels =8 , + .vref_mv =4096 , +}; + +static const struct ltc2632_chip_info ltc2636h8_chip_info = { + .channels = ltc2632x8_channels, + .num_channels =8 , + .vref_mv =4096 , };static int ltc2632_probe (struct spi_device *spi)
@@ -354,84 +348,47 @@ static int ltc2632_probe(struct spi_device *spi) }static const struct spi_device_id ltc2632_id[] = { - {"ltc2632-l12" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2632L12 ] }, - {"ltc2632-l10" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2632L10 ] }, - {"ltc2632-l8" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2632L8 ] }, - {"ltc2632-h12" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2632H12 ] }, - {"ltc2632-h10" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2632H10 ] }, - {"ltc2632-h8" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2632H8 ] }, - {"ltc2634-l12" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2634L12 ] }, - {"ltc2634-l10" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2634L10 ] }, - {"ltc2634-l8" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2634L8 ] }, - {"ltc2634-h12" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2634H12 ] }, - {"ltc2634-h10" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2634H10 ] }, - {"ltc2634-h8" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2634H8 ] }, - {"ltc2636-l12" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2636L12 ] }, - {"ltc2636-l10" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2636L10 ] }, - {"ltc2636-l8" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2636L8 ] }, - {"ltc2636-h12" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2636H12 ] }, - {"ltc2636-h10" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2636H10 ] }, - {"ltc2636-h8" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2636H8 ] }, + {"ltc2632-l12" , (kernel_ulong_t)<c2632l12_chip_info }, + {"ltc2632-l10" , (kernel_ulong_t)<c2632l10_chip_info }, + {"ltc2632-l8" , (kernel_ulong_t)<c2632l8_chip_info }, + {"ltc2632-h12" , (kernel_ulong_t)<c2632h12_chip_info }, + {"ltc2632-h10" , (kernel_ulong_t)<c2632h10_chip_info }, + {"ltc2632-h8" , (kernel_ulong_t)<c2632h8_chip_info }, + {"ltc2634-l12" , (kernel_ulong_t)<c2634l12_chip_info }, + {"ltc2634-l10" , (kernel_ulong_t)<c2634l10_chip_info }, + {"ltc2634-l8" , (kernel_ulong_t)<c2634l8_chip_info }, + {"ltc2634-h12" , (kernel_ulong_t)<c2634h12_chip_info }, + {"ltc2634-h10" , (kernel_ulong_t)<c2634h10_chip_info }, + {"ltc2634-h8" , (kernel_ulong_t)<c2634h8_chip_info }, + {"ltc2636-l12" , (kernel_ulong_t)<c2636l12_chip_info }, + {"ltc2636-l10" , (kernel_ulong_t)<c2636l10_chip_info }, + {"ltc2636-l8" , (kernel_ulong_t)<c2636l8_chip_info }, + {"ltc2636-h12" , (kernel_ulong_t)<c2636h12_chip_info }, + {"ltc2636-h10" , (kernel_ulong_t)<c2636h10_chip_info }, + {"ltc2636-h8" , (kernel_ulong_t)<c2636h8_chip_info }, { } };MODULE_DEVICE_TABLE (spi, ltc2632_id);static const struct of_device_id ltc2632_of_match[] = { - { - .compatible ="lltc,ltc2632-l12" , - .data = <c2632_chip_info_tbl[ID_LTC2632L12 ] - }, { - .compatible ="lltc,ltc2632-l10" , - .data = <c2632_chip_info_tbl[ID_LTC2632L10 ] - }, { - .compatible ="lltc,ltc2632-l8" , - .data = <c2632_chip_info_tbl[ID_LTC2632L8 ] - }, { - .compatible ="lltc,ltc2632-h12" , - .data = <c2632_chip_info_tbl[ID_LTC2632H12 ] - }, { - .compatible ="lltc,ltc2632-h10" , - .data = <c2632_chip_info_tbl[ID_LTC2632H10 ] - }, { - .compatible ="lltc,ltc2632-h8" , - .data = <c2632_chip_info_tbl[ID_LTC2632H8 ] - }, { - .compatible ="lltc,ltc2634-l12" , - .data = <c2632_chip_info_tbl[ID_LTC2634L12 ] - }, { - .compatible ="lltc,ltc2634-l10" , - .data = <c2632_chip_info_tbl[ID_LTC2634L10 ] - }, { - .compatible ="lltc,ltc2634-l8" , - .data = <c2632_chip_info_tbl[ID_LTC2634L8 ] - }, { - .compatible ="lltc,ltc2634-h12" , - .data = <c2632_chip_info_tbl[ID_LTC2634H12 ] - }, { - .compatible ="lltc,ltc2634-h10" , - .data = <c2632_chip_info_tbl[ID_LTC2634H10 ] - }, { - .compatible ="lltc,ltc2634-h8" , - .data = <c2632_chip_info_tbl[ID_LTC2634H8 ] - }, { - .compatible ="lltc,ltc2636-l12" , - .data = <c2632_chip_info_tbl[ID_LTC2636L12 ] - }, { - .compatible ="lltc,ltc2636-l10" , - .data = <c2632_chip_info_tbl[ID_LTC2636L10 ] - }, { - .compatible ="lltc,ltc2636-l8" , - .data = <c2632_chip_info_tbl[ID_LTC2636L8 ] - }, { - .compatible ="lltc,ltc2636-h12" , - .data = <c2632_chip_info_tbl[ID_LTC2636H12 ] - }, { - .compatible ="lltc,ltc2636-h10" , - .data = <c2632_chip_info_tbl[ID_LTC2636H10 ] - }, { - .compatible ="lltc,ltc2636-h8" , - .data = <c2632_chip_info_tbl[ID_LTC2636H8 ] - }, + { .compatible ="lltc,ltc2632-l12" , .data = <c2632l12_chip_info }, + { .compatible ="lltc,ltc2632-l10" , .data = <c2632l10_chip_info }, + { .compatible ="lltc,ltc2632-l8" , .data = <c2632l8_chip_info }, + { .compatible ="lltc,ltc2632-h12" , .data = <c2632h12_chip_info }, + { .compatible ="lltc,ltc2632-h10" , .data = <c2632h10_chip_info }, + { .compatible ="lltc,ltc2632-h8" , .data = <c2632h8_chip_info }, + { .compatible ="lltc,ltc2634-l12" , .data = <c2634l12_chip_info }, + { .compatible ="lltc,ltc2634-l10" , .data = <c2634l10_chip_info }, + { .compatible ="lltc,ltc2634-l8" , .data = <c2634l8_chip_info }, + { .compatible ="lltc,ltc2634-h12" , .data = <c2634h12_chip_info }, + { .compatible ="lltc,ltc2634-h10" , .data = <c2634h10_chip_info }, + { .compatible ="lltc,ltc2634-h8" , .data = <c2634h8_chip_info }, + { .compatible ="lltc,ltc2636-l12" , .data = <c2636l12_chip_info }, + { .compatible ="lltc,ltc2636-l10" , .data = <c2636l10_chip_info }, + { .compatible ="lltc,ltc2636-l8" , .data = <c2636l8_chip_info }, + { .compatible ="lltc,ltc2636-h12" , .data = <c2636h12_chip_info }, + { .compatible ="lltc,ltc2636-h10" , .data = <c2636h10_chip_info }, + { .compatible ="lltc,ltc2636-h8" , .data = <c2636h8_chip_info }, { } };MODULE_DEVICE_TABLE (of, ltc2632_of_match);
Signature · 1 line
2.50.1
Re: [PATCH 1/3] iio: dac: ltc2632: drop enum and use individual chip_info objects
Quoted 4 lines · David Marinović
Remove the ltc2632_chip_info_tbl[] array and related
ltc2632_supported_device_idsenum used for looking up chip-specific information. Instead, use separate static const structltc2632_chip_infoobjects for each supported chip variant.
(I have not reviewed that scrupulously, but at the brief look for the values
and names LGTM.)
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH v2 2/3 dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings
In reply to David MarinovićFrom: David Marinovic <[email protected]>
The LTC2654 is a quad-channel, 16-/12-bit DAC with internal reference voltage and SPI interface, sharing the same 24-bit SPI protocol as the LTC2632/2634/2636 family.
Add compatible strings for the following variants:
- lltc,ltc2654-l16: 16-bit, 2.5V internal reference
- lltc,ltc2654-l12: 12-bit, 2.5V internal reference
- lltc,ltc2654-h16: 16-bit, 4.096V internal reference
- lltc,ltc2654-h12: 12-bit, 4.096V internal reference
--- .../devicetree/bindings/iio/dac/lltc,ltc2632.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/iio/dac/lltc,ltc2632.yaml +9 -3
@@ -4,14 +4,16 @@ $id: http://devicetree.org/schemas/iio/dac/lltc,ltc2632.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Linear Technology LTC263x 12-/10-/8-Bit Rail-to-Rail DAC +title: Linear Technology LTC263x and LTC2654 Rail-to-Rail DAC maintainers: - Michael Hennerich <[email protected]> description: | - Bindings for the Linear Technology LTC2632/2634/2636 DAC - Datasheet can be found here: https://www.analog.com/media/en/technical-documentation/data-sheets/LTC263[246].pdf + Bindings for the Linear Technology LTC2632/2634/2636/2654 DAC + Datasheet can be found here: + https://www.analog.com/media/en/technical-documentation/data-sheets/LTC263[246].pdf + https://www.analog.com/media/en/technical-documentation/data-sheets/2654f.pdf properties: compatible:
@@ -34,6 +36,10 @@ properties: - lltc,ltc2636-h12 - lltc,ltc2636-h10 - lltc,ltc2636-h8 + - lltc,ltc2654-l16 + - lltc,ltc2654-l12 + - lltc,ltc2654-h16 + - lltc,ltc2654-h12 reg: maxItems: 1
Signature · 1 line
2.50.1
Re: [PATCH 2/3] dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings
Quoted 5 lines · David Marinović
From: David Marinovic <[email protected]>
The LTC2654 is a quad-channel, 16-/12-bit DAC with internal reference voltage and SPI interface, sharing the same 24-bit SPI protocol as the LTC2632/2634/2636 family.
What makes these devices incompatible from the existing ones in the file?
Can you add a note about that please?
Thanks,
Conor.
Quoted 50 lines
Add compatible strings for the following variants:
- lltc,ltc2654-l16: 16-bit, 2.5V internal reference
- lltc,ltc2654-l12: 12-bit, 2.5V internal reference
- lltc,ltc2654-h16: 16-bit, 4.096V internal reference
- lltc,ltc2654-h12: 12-bit, 4.096V internal referenceSigned-off-by David Marinovic <[email protected]>--- .../devicetree/bindings/iio/dac/lltc,ltc2632.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)Documentation/devicetree/bindings/iio/dac/lltc,ltc2632.yaml +9
-3@@ -4,14 +4,16 @@ $id: http://devicetree.org/schemas/iio/dac/lltc,ltc2632.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Linear Technology LTC263x 12-/10-/8-Bit Rail-to-Rail DAC +title: Linear Technology LTC263x and LTC2654 Rail-to-Rail DAC maintainers: - Michael Hennerich <[email protected]> description: | - Bindings for the Linear Technology LTC2632/2634/2636 DAC - Datasheet can be found here: https://www.analog.com/media/en/technical-documentation/data-sheets/LTC263[246].pdf + Bindings for the Linear Technology LTC2632/2634/2636/2654 DAC + Datasheet can be found here: + https://www.analog.com/media/en/technical-documentation/data-sheets/LTC263[246].pdf + https://www.analog.com/media/en/technical-documentation/data-sheets/2654f.pdf properties: compatible:@@ -34,6 +36,10 @@ properties: - lltc,ltc2636-h12 - lltc,ltc2636-h10 - lltc,ltc2636-h8 + - lltc,ltc2654-l16 + - lltc,ltc2654-l12 + - lltc,ltc2654-h16 + - lltc,ltc2654-h12 reg: maxItems: 1Signature · 1 line
2.50.1
PATCH v2 3/3 iio: dac: ltc2632: add support for LTC2654 DAC family
In reply to David MarinovićFrom: David Marinovic <[email protected]>
Add support for the Linear Technology LTC2654 quad DAC family. The LTC2654 is a 4-channel, 16-/12-bit DAC with SPI interface, sharing the same 24-bit SPI protocol as the existing LTC2632/ LTC2634/LTC2636 devices supported by this driver.
The LTC2654L-16 variant has been tested on a Phytec phyCORE-STM32MP1 board with the DAC connected via SPI1. The driver probes successfully and all 4 channels are accessible via the IIO sysfs interface.
Add support for the following variants:
- LTC2654L-16: 16-bit, 2.5V internal reference
- LTC2654L-12: 12-bit, 2.5V internal reference
- LTC2654H-16: 16-bit, 4.096V internal reference
- LTC2654H-12: 12-bit, 4.096V internal reference
--- drivers/iio/dac/ltc2632.c | 40 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-)
drivers/iio/dac/ltc2632.c +37 -3
@@ -58,8 +58,9 @@ static int ltc2632_spi_write(struct spi_device *spi,* The input shift register is 24 bits wide. * The next four are the command bits, C3 to C0, * followed by the 4-bit DAC address, A3 to A0, and then the -* 12-, 10-, 8-bit data-word. The data-word comprises the 12-, -* 10-, 8-bit input code followed by 4, 6, or 8 don't care bits. +* 16-, 12-, 10-, 8-bit data-word. The data-word comprises the +* 16-, 12-, 10-, 8-bit input code followed by 0, 4, 6, or 8 +* don't care bits. */ data = (cmd <<20 ) | (addr <<16 ) | (val << shift);put_unaligned_be24 (data, &msg[0 ]);
@@ -185,6 +186,7 @@ static const struct iio_chan_spec_ext_info ltc2632_ext_info[] = { LTC2632_CHANNEL(7, _bits), \ } +static DECLARE_LTC2632_CHANNELS(ltc2632x16, 16); static DECLARE_LTC2632_CHANNELS(ltc2632x12, 12); static DECLARE_LTC2632_CHANNELS(ltc2632x10, 10); static DECLARE_LTC2632_CHANNELS(ltc2632x8, 8);
@@ -297,6 +299,30 @@ static const struct ltc2632_chip_info ltc2636h8_chip_info = { .vref_mv = 4096, }; +static const struct ltc2632_chip_info ltc2654l16_chip_info = { + .channels = ltc2632x16_channels, + .num_channels =4 , + .vref_mv =2500 , +}; + +static const struct ltc2632_chip_info ltc2654l12_chip_info = { + .channels = ltc2632x12_channels, + .num_channels =4 , + .vref_mv =2500 , +}; + +static const struct ltc2632_chip_info ltc2654h16_chip_info = { + .channels = ltc2632x16_channels, + .num_channels =4 , + .vref_mv =4096 , +}; + +static const struct ltc2632_chip_info ltc2654h12_chip_info = { + .channels = ltc2632x12_channels, + .num_channels =4 , + .vref_mv =4096 , +}; +static int ltc2632_probe (struct spi_device *spi) {struct ltc2632_state *st;
@@ -366,6 +392,10 @@ static const struct spi_device_id ltc2632_id[] = { { "ltc2636-h12", (kernel_ulong_t)<c2636h12_chip_info }, { "ltc2636-h10", (kernel_ulong_t)<c2636h10_chip_info }, { "ltc2636-h8", (kernel_ulong_t)<c2636h8_chip_info }, + { "ltc2654-l16", (kernel_ulong_t)<c2654l16_chip_info }, + { "ltc2654-l12", (kernel_ulong_t)<c2654l12_chip_info }, + { "ltc2654-h16", (kernel_ulong_t)<c2654h16_chip_info }, + { "ltc2654-h12", (kernel_ulong_t)<c2654h12_chip_info }, { } };MODULE_DEVICE_TABLE (spi, ltc2632_id);
@@ -389,6 +419,10 @@ static const struct of_device_id ltc2632_of_match[] = { { .compatible = "lltc,ltc2636-h12", .data = <c2636h12_chip_info }, { .compatible = "lltc,ltc2636-h10", .data = <c2636h10_chip_info }, { .compatible = "lltc,ltc2636-h8", .data = <c2636h8_chip_info }, + { .compatible = "lltc,ltc2654-l16", .data = <c2654l16_chip_info }, + { .compatible = "lltc,ltc2654-l12", .data = <c2654l12_chip_info }, + { .compatible = "lltc,ltc2654-h16", .data = <c2654h16_chip_info }, + { .compatible = "lltc,ltc2654-h12", .data = <c2654h12_chip_info }, { } };MODULE_DEVICE_TABLE (of, ltc2632_of_match);
@@ -404,5 +438,5 @@ static struct spi_driver ltc2632_driver = {module_spi_driver (ltc2632_driver);MODULE_AUTHOR ("Maxime Roussin-Belanger <[email protected]>" ); -MODULE_DESCRIPTION ("LTC2632 DAC SPI driver" ); +MODULE_DESCRIPTION ("LTC2632/LTC2654 DAC SPI driver" );MODULE_LICENSE ("GPL v2" );
Signature · 1 line
2.50.1
v3 cover iio: dac: ltc2632: add support for LTC2654 DAC family
In reply to David MarinovićFrom: David Marinovic <[email protected]>
Greetings!
This is v3 of the LTC2654 DAC support patch series.
The LTC2654 is a quad-channel, 16-/12-bit DAC with internal reference voltage and SPI interface, sharing the same 24-bit SPI protocol as the LTC2632/2634/2636 family.
The LTC2654L-16 variant was tested on a Phytec phyCORE-STM32MP1 board with the DAC connected via SPI1. The driver probes successfully and all 4 channels are accessible via IIO sysfs.
Changes in v3:
- Patch 1 unchanged
- DT bindings use fallback compatibles for LTC2654-L12 and LTC2654-H12, which are register-compatible with LTC2634-L12 and LTC2634-H12
- LTC2654-L16 and LTC2654-H16 keep separate compatible strings as no existing compatible supports 16-bit resolution
- 12-bit variants reuse existing LTC2634 chip_info structures, so only two new chip_info structures are added for 16-bit variants
David Marinovic (3):
iio: dac: ltc2632: drop enum and use individual chip_info objects
dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings
iio: dac: ltc2632: add support for LTC2654 DAC family
.../bindings/iio/dac/lltc,ltc2632.yaml | 12 +- drivers/iio/dac/ltc2632.c | 367 +++++++++--------- 2 files changed, 188 insertions(+), 191 deletions(-)
Signature · 1 line
2.50.1
PATCH v3 1/3 iio: dac: ltc2632: drop enum and use individual chip_info objects
From: David Marinovic <[email protected]>
Remove the ltc2632_chip_info_tbl[] array and related ltc2632_supported_device_ids enum used for looking up chip-specific information. Instead, use separate static const struct ltc2632_chip_info objects for each supported chip variant.
--- drivers/iio/dac/ltc2632.c | 327 +++++++++++++++++--------------------- 1 file changed, 142 insertions(+), 185 deletions(-)
drivers/iio/dac/ltc2632.c +142 -185
@@ -48,27 +48,6 @@ struct ltc2632_state {int vref_mv; }; -enum ltc2632_supported_device_ids { -ID_LTC2632L12 , -ID_LTC2632L10 , -ID_LTC2632L8 , -ID_LTC2632H12 , -ID_LTC2632H10 , -ID_LTC2632H8 , -ID_LTC2634L12 , -ID_LTC2634L10 , -ID_LTC2634L8 , -ID_LTC2634H12 , -ID_LTC2634H10 , -ID_LTC2634H8 , -ID_LTC2636L12 , -ID_LTC2636L10 , -ID_LTC2636L8 , -ID_LTC2636H12 , -ID_LTC2636H10 , -ID_LTC2636H8 , -}; -static int ltc2632_spi_write (struct spi_device *spi,u8 cmd,u8 addr,u16 val,u8 shift) {
@@ -210,97 +189,112 @@ static DECLARE_LTC2632_CHANNELS(ltc2632x12, 12); static DECLARE_LTC2632_CHANNELS(ltc2632x10, 10); static DECLARE_LTC2632_CHANNELS(ltc2632x8, 8); -static const struct ltc2632_chip_info ltc2632_chip_info_tbl[] = { - [ID_LTC2632L12 ] = { - .channels = ltc2632x12_channels, - .num_channels =2 , - .vref_mv =2500 , - }, - [ID_LTC2632L10 ] = { - .channels = ltc2632x10_channels, - .num_channels =2 , - .vref_mv =2500 , - }, - [ID_LTC2632L8 ] = { - .channels = ltc2632x8_channels, - .num_channels =2 , - .vref_mv =2500 , - }, - [ID_LTC2632H12 ] = { - .channels = ltc2632x12_channels, - .num_channels =2 , - .vref_mv =4096 , - }, - [ID_LTC2632H10 ] = { - .channels = ltc2632x10_channels, - .num_channels =2 , - .vref_mv =4096 , - }, - [ID_LTC2632H8 ] = { - .channels = ltc2632x8_channels, - .num_channels =2 , - .vref_mv =4096 , - }, - [ID_LTC2634L12 ] = { - .channels = ltc2632x12_channels, - .num_channels =4 , - .vref_mv =2500 , - }, - [ID_LTC2634L10 ] = { - .channels = ltc2632x10_channels, - .num_channels =4 , - .vref_mv =2500 , - }, - [ID_LTC2634L8 ] = { - .channels = ltc2632x8_channels, - .num_channels =4 , - .vref_mv =2500 , - }, - [ID_LTC2634H12 ] = { - .channels = ltc2632x12_channels, - .num_channels =4 , - .vref_mv =4096 , - }, - [ID_LTC2634H10 ] = { - .channels = ltc2632x10_channels, - .num_channels =4 , - .vref_mv =4096 , - }, - [ID_LTC2634H8 ] = { - .channels = ltc2632x8_channels, - .num_channels =4 , - .vref_mv =4096 , - }, - [ID_LTC2636L12 ] = { - .channels = ltc2632x12_channels, - .num_channels =8 , - .vref_mv =2500 , - }, - [ID_LTC2636L10 ] = { - .channels = ltc2632x10_channels, - .num_channels =8 , - .vref_mv =2500 , - }, - [ID_LTC2636L8 ] = { - .channels = ltc2632x8_channels, - .num_channels =8 , - .vref_mv =2500 , - }, - [ID_LTC2636H12 ] = { - .channels = ltc2632x12_channels, - .num_channels =8 , - .vref_mv =4096 , - }, - [ID_LTC2636H10 ] = { - .channels = ltc2632x10_channels, - .num_channels =8 , - .vref_mv =4096 , - }, - [ID_LTC2636H8 ] = { - .channels = ltc2632x8_channels, - .num_channels =8 , - .vref_mv =4096 , - }, +static const struct ltc2632_chip_info ltc2632l12_chip_info = { + .channels = ltc2632x12_channels, + .num_channels =2 , + .vref_mv =2500 , +}; + +static const struct ltc2632_chip_info ltc2632l10_chip_info = { + .channels = ltc2632x10_channels, + .num_channels =2 , + .vref_mv =2500 , +}; + +static const struct ltc2632_chip_info ltc2632l8_chip_info = { + .channels = ltc2632x8_channels, + .num_channels =2 , + .vref_mv =2500 , +}; + +static const struct ltc2632_chip_info ltc2632h12_chip_info = { + .channels = ltc2632x12_channels, + .num_channels =2 , + .vref_mv =4096 , +}; + +static const struct ltc2632_chip_info ltc2632h10_chip_info = { + .channels = ltc2632x10_channels, + .num_channels =2 , + .vref_mv =4096 , +}; + +static const struct ltc2632_chip_info ltc2632h8_chip_info = { + .channels = ltc2632x8_channels, + .num_channels =2 , + .vref_mv =4096 , +}; + +static const struct ltc2632_chip_info ltc2634l12_chip_info = { + .channels = ltc2632x12_channels, + .num_channels =4 , + .vref_mv =2500 , +}; + +static const struct ltc2632_chip_info ltc2634l10_chip_info = { + .channels = ltc2632x10_channels, + .num_channels =4 , + .vref_mv =2500 , +}; + +static const struct ltc2632_chip_info ltc2634l8_chip_info = { + .channels = ltc2632x8_channels, + .num_channels =4 , + .vref_mv =2500 , +}; + +static const struct ltc2632_chip_info ltc2634h12_chip_info = { + .channels = ltc2632x12_channels, + .num_channels =4 , + .vref_mv =4096 , +}; + +static const struct ltc2632_chip_info ltc2634h10_chip_info = { + .channels = ltc2632x10_channels, + .num_channels =4 , + .vref_mv =4096 , +}; + +static const struct ltc2632_chip_info ltc2634h8_chip_info = { + .channels = ltc2632x8_channels, + .num_channels =4 , + .vref_mv =4096 , +}; + +static const struct ltc2632_chip_info ltc2636l12_chip_info = { + .channels = ltc2632x12_channels, + .num_channels =8 , + .vref_mv =2500 , +}; + +static const struct ltc2632_chip_info ltc2636l10_chip_info = { + .channels = ltc2632x10_channels, + .num_channels =8 , + .vref_mv =2500 , +}; + +static const struct ltc2632_chip_info ltc2636l8_chip_info = { + .channels = ltc2632x8_channels, + .num_channels =8 , + .vref_mv =2500 , +}; + +static const struct ltc2632_chip_info ltc2636h12_chip_info = { + .channels = ltc2632x12_channels, + .num_channels =8 , + .vref_mv =4096 , +}; + +static const struct ltc2632_chip_info ltc2636h10_chip_info = { + .channels = ltc2632x10_channels, + .num_channels =8 , + .vref_mv =4096 , +}; + +static const struct ltc2632_chip_info ltc2636h8_chip_info = { + .channels = ltc2632x8_channels, + .num_channels =8 , + .vref_mv =4096 , };static int ltc2632_probe (struct spi_device *spi)
@@ -354,84 +348,47 @@ static int ltc2632_probe(struct spi_device *spi) }static const struct spi_device_id ltc2632_id[] = { - {"ltc2632-l12" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2632L12 ] }, - {"ltc2632-l10" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2632L10 ] }, - {"ltc2632-l8" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2632L8 ] }, - {"ltc2632-h12" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2632H12 ] }, - {"ltc2632-h10" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2632H10 ] }, - {"ltc2632-h8" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2632H8 ] }, - {"ltc2634-l12" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2634L12 ] }, - {"ltc2634-l10" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2634L10 ] }, - {"ltc2634-l8" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2634L8 ] }, - {"ltc2634-h12" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2634H12 ] }, - {"ltc2634-h10" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2634H10 ] }, - {"ltc2634-h8" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2634H8 ] }, - {"ltc2636-l12" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2636L12 ] }, - {"ltc2636-l10" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2636L10 ] }, - {"ltc2636-l8" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2636L8 ] }, - {"ltc2636-h12" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2636H12 ] }, - {"ltc2636-h10" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2636H10 ] }, - {"ltc2636-h8" , (kernel_ulong_t)<c2632_chip_info_tbl[ID_LTC2636H8 ] }, + {"ltc2632-l12" , (kernel_ulong_t)<c2632l12_chip_info }, + {"ltc2632-l10" , (kernel_ulong_t)<c2632l10_chip_info }, + {"ltc2632-l8" , (kernel_ulong_t)<c2632l8_chip_info }, + {"ltc2632-h12" , (kernel_ulong_t)<c2632h12_chip_info }, + {"ltc2632-h10" , (kernel_ulong_t)<c2632h10_chip_info }, + {"ltc2632-h8" , (kernel_ulong_t)<c2632h8_chip_info }, + {"ltc2634-l12" , (kernel_ulong_t)<c2634l12_chip_info }, + {"ltc2634-l10" , (kernel_ulong_t)<c2634l10_chip_info }, + {"ltc2634-l8" , (kernel_ulong_t)<c2634l8_chip_info }, + {"ltc2634-h12" , (kernel_ulong_t)<c2634h12_chip_info }, + {"ltc2634-h10" , (kernel_ulong_t)<c2634h10_chip_info }, + {"ltc2634-h8" , (kernel_ulong_t)<c2634h8_chip_info }, + {"ltc2636-l12" , (kernel_ulong_t)<c2636l12_chip_info }, + {"ltc2636-l10" , (kernel_ulong_t)<c2636l10_chip_info }, + {"ltc2636-l8" , (kernel_ulong_t)<c2636l8_chip_info }, + {"ltc2636-h12" , (kernel_ulong_t)<c2636h12_chip_info }, + {"ltc2636-h10" , (kernel_ulong_t)<c2636h10_chip_info }, + {"ltc2636-h8" , (kernel_ulong_t)<c2636h8_chip_info }, { } };MODULE_DEVICE_TABLE (spi, ltc2632_id);static const struct of_device_id ltc2632_of_match[] = { - { - .compatible ="lltc,ltc2632-l12" , - .data = <c2632_chip_info_tbl[ID_LTC2632L12 ] - }, { - .compatible ="lltc,ltc2632-l10" , - .data = <c2632_chip_info_tbl[ID_LTC2632L10 ] - }, { - .compatible ="lltc,ltc2632-l8" , - .data = <c2632_chip_info_tbl[ID_LTC2632L8 ] - }, { - .compatible ="lltc,ltc2632-h12" , - .data = <c2632_chip_info_tbl[ID_LTC2632H12 ] - }, { - .compatible ="lltc,ltc2632-h10" , - .data = <c2632_chip_info_tbl[ID_LTC2632H10 ] - }, { - .compatible ="lltc,ltc2632-h8" , - .data = <c2632_chip_info_tbl[ID_LTC2632H8 ] - }, { - .compatible ="lltc,ltc2634-l12" , - .data = <c2632_chip_info_tbl[ID_LTC2634L12 ] - }, { - .compatible ="lltc,ltc2634-l10" , - .data = <c2632_chip_info_tbl[ID_LTC2634L10 ] - }, { - .compatible ="lltc,ltc2634-l8" , - .data = <c2632_chip_info_tbl[ID_LTC2634L8 ] - }, { - .compatible ="lltc,ltc2634-h12" , - .data = <c2632_chip_info_tbl[ID_LTC2634H12 ] - }, { - .compatible ="lltc,ltc2634-h10" , - .data = <c2632_chip_info_tbl[ID_LTC2634H10 ] - }, { - .compatible ="lltc,ltc2634-h8" , - .data = <c2632_chip_info_tbl[ID_LTC2634H8 ] - }, { - .compatible ="lltc,ltc2636-l12" , - .data = <c2632_chip_info_tbl[ID_LTC2636L12 ] - }, { - .compatible ="lltc,ltc2636-l10" , - .data = <c2632_chip_info_tbl[ID_LTC2636L10 ] - }, { - .compatible ="lltc,ltc2636-l8" , - .data = <c2632_chip_info_tbl[ID_LTC2636L8 ] - }, { - .compatible ="lltc,ltc2636-h12" , - .data = <c2632_chip_info_tbl[ID_LTC2636H12 ] - }, { - .compatible ="lltc,ltc2636-h10" , - .data = <c2632_chip_info_tbl[ID_LTC2636H10 ] - }, { - .compatible ="lltc,ltc2636-h8" , - .data = <c2632_chip_info_tbl[ID_LTC2636H8 ] - }, + { .compatible ="lltc,ltc2632-l12" , .data = <c2632l12_chip_info }, + { .compatible ="lltc,ltc2632-l10" , .data = <c2632l10_chip_info }, + { .compatible ="lltc,ltc2632-l8" , .data = <c2632l8_chip_info }, + { .compatible ="lltc,ltc2632-h12" , .data = <c2632h12_chip_info }, + { .compatible ="lltc,ltc2632-h10" , .data = <c2632h10_chip_info }, + { .compatible ="lltc,ltc2632-h8" , .data = <c2632h8_chip_info }, + { .compatible ="lltc,ltc2634-l12" , .data = <c2634l12_chip_info }, + { .compatible ="lltc,ltc2634-l10" , .data = <c2634l10_chip_info }, + { .compatible ="lltc,ltc2634-l8" , .data = <c2634l8_chip_info }, + { .compatible ="lltc,ltc2634-h12" , .data = <c2634h12_chip_info }, + { .compatible ="lltc,ltc2634-h10" , .data = <c2634h10_chip_info }, + { .compatible ="lltc,ltc2634-h8" , .data = <c2634h8_chip_info }, + { .compatible ="lltc,ltc2636-l12" , .data = <c2636l12_chip_info }, + { .compatible ="lltc,ltc2636-l10" , .data = <c2636l10_chip_info }, + { .compatible ="lltc,ltc2636-l8" , .data = <c2636l8_chip_info }, + { .compatible ="lltc,ltc2636-h12" , .data = <c2636h12_chip_info }, + { .compatible ="lltc,ltc2636-h10" , .data = <c2636h10_chip_info }, + { .compatible ="lltc,ltc2636-h8" , .data = <c2636h8_chip_info }, { } };MODULE_DEVICE_TABLE (of, ltc2632_of_match);
Signature · 1 line
2.50.1
PATCH v3 2/3 dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings
In reply to David MarinovićFrom: David Marinovic <[email protected]>
Add compatible strings for the LTC2654 quad-channel DAC family.
The LTC2654 devices are 4-channel, 16-/12-bit DACs with an internal reference and SPI interface. They use the same 24-bit SPI command format as the LTC2632/2634/2636 family.
The 16-bit variants (LTC2654-L16 and LTC2654-H16) require new compatible strings, as no existing compatibles support 16-bit resolution.
The 12-bit variants (LTC2654-L12 and LTC2654-H12) are register- compatible with LTC2634-L12 and LTC2634-H12 respectively, and can use them as fallback compatibles.
Changes added for:
- lltc,ltc2654-l16: 16-bit, 2.5V internal reference
- lltc,ltc2654-l12: 12-bit, 2.5V internal reference (fallback to lltc,ltc2634-l12)
- lltc,ltc2654-h16: 16-bit, 4.096V internal reference
- lltc,ltc2654-h12: 12-bit, 4.096V internal reference (fallback to lltc,ltc2634-h12)
--- .../bindings/iio/dac/lltc,ltc2632.yaml | 57 ++++++++++++------- 1 file changed, 35 insertions(+), 22 deletions(-)
Documentation/devicetree/bindings/iio/dac/lltc,ltc2632.yaml +35 -22
@@ -4,36 +4,49 @@ $id: http://devicetree.org/schemas/iio/dac/lltc,ltc2632.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Linear Technology LTC263x 12-/10-/8-Bit Rail-to-Rail DAC +title: Linear Technology LTC263x and LTC2654 Rail-to-Rail DAC maintainers: - Michael Hennerich <[email protected]> description: | - Bindings for the Linear Technology LTC2632/2634/2636 DAC - Datasheet can be found here: https://www.analog.com/media/en/technical-documentation/data-sheets/LTC263[246].pdf + Bindings for the Linear Technology LTC2632/2634/2636/2654 DAC + Datasheet can be found here: + https://www.analog.com/media/en/technical-documentation/data-sheets/LTC263[246].pdf + https://www.analog.com/media/en/technical-documentation/data-sheets/2654f.pdf properties: compatible: - enum: - - lltc,ltc2632-l12 - - lltc,ltc2632-l10 - - lltc,ltc2632-l8 - - lltc,ltc2632-h12 - - lltc,ltc2632-h10 - - lltc,ltc2632-h8 - - lltc,ltc2634-l12 - - lltc,ltc2634-l10 - - lltc,ltc2634-l8 - - lltc,ltc2634-h12 - - lltc,ltc2634-h10 - - lltc,ltc2634-h8 - - lltc,ltc2636-l12 - - lltc,ltc2636-l10 - - lltc,ltc2636-l8 - - lltc,ltc2636-h12 - - lltc,ltc2636-h10 - - lltc,ltc2636-h8 + oneOf: + - enum: + - lltc,ltc2632-l12 + - lltc,ltc2632-l10 + - lltc,ltc2632-l8 + - lltc,ltc2632-h12 + - lltc,ltc2632-h10 + - lltc,ltc2632-h8 + - lltc,ltc2634-l12 + - lltc,ltc2634-l10 + - lltc,ltc2634-l8 + - lltc,ltc2634-h12 + - lltc,ltc2634-h10 + - lltc,ltc2634-h8 + - lltc,ltc2636-l12 + - lltc,ltc2636-l10 + - lltc,ltc2636-l8 + - lltc,ltc2636-h12 + - lltc,ltc2636-h10 + - lltc,ltc2636-h8 + - lltc,ltc2654-l16 + - lltc,ltc2654-h16 + - items: + - enum: + - lltc,ltc2654-l12 + - const: lltc,ltc2634-l12 + - items: + - enum: + - lltc,ltc2654-h12 + - const: lltc,ltc2634-h12 reg: maxItems: 1
Signature · 1 line
2.50.1
Re: [PATCH v3 2/3] dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings
Quoted 17 lines · David Marinović
From: David Marinovic <[email protected]>
Add compatible strings for the LTC2654 quad-channel DAC family.
The LTC2654 devices are 4-channel, 16-/12-bit DACs with an internal reference and SPI interface. They use the same 24-bit SPI command format as the LTC2632/2634/2636 family.
The 16-bit variants (LTC2654-L16 and LTC2654-H16) require new compatible strings, as no existing compatibles support 16-bit resolution.
The 12-bit variants (LTC2654-L12 and LTC2654-H12) are register- compatible with LTC2634-L12 and LTC2634-H12 respectively, and can use them as fallback compatibles.
Quoted 5 lines
Changes added for:
- lltc,ltc2654-l16: 16-bit, 2.5V internal reference
- lltc,ltc2654-l12: 12-bit, 2.5V internal reference (fallback to lltc,ltc2634-l12)
- lltc,ltc2654-h16: 16-bit, 4.096V internal reference
- lltc,ltc2654-h12: 12-bit, 4.096V internal reference (fallback to lltc,ltc2634-h12)
No idea what this section is doing, could probably cull it if there's another version.
pw-bot: not-applicable
btw, please don't send new versions in reply to old ones, can cause you to get buried in people's mailboxes.
Cheers,
Conor.
Jonathan Cameron
maintainerRe: [PATCH v3 2/3] dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings
Quoted 18 lines · On Fri, 20 Mar 2026 17:20:28 +0000 Conor Dooley <[email protected]> wrote:
Quoted 16 lines · David Marinović
From: David Marinovic <[email protected]>
Add compatible strings for the LTC2654 quad-channel DAC family.
The LTC2654 devices are 4-channel, 16-/12-bit DACs with an internal reference and SPI interface. They use the same 24-bit SPI command format as the LTC2632/2634/2636 family.
The 16-bit variants (LTC2654-L16 and LTC2654-H16) require new compatible strings, as no existing compatibles support 16-bit resolution.
The 12-bit variants (LTC2654-L12 and LTC2654-H12) are register- compatible with LTC2634-L12 and LTC2634-H12 respectively, and can use them as fallback compatibles.
Quoted 8 lines
Quoted 5 lines
Changes added for:
- lltc,ltc2654-l16: 16-bit, 2.5V internal reference
- lltc,ltc2654-l12: 12-bit, 2.5V internal reference (fallback to lltc,ltc2634-l12)
- lltc,ltc2654-h16: 16-bit, 4.096V internal reference
- lltc,ltc2654-h12: 12-bit, 4.096V internal reference (fallback to lltc,ltc2634-h12)No idea what this section is doing, could probably cull it if there's another version.
I dropped that section whilst applying.
Quoted 8 lines
Acked-by Conor Dooley <[email protected]>pw-bot: not-applicable
btw, please don't send new versions in reply to old ones, can cause you to get buried in people's mailboxes.
Cheers,
Conor.
PATCH v3 3/3 iio: dac: ltc2632: add support for LTC2654 DAC family
In reply to David MarinovićFrom: David Marinovic <[email protected]>
Add support for the Linear Technology LTC2654 quad DAC family.
The LTC2654 is a 4-channel, 16-/12-bit DAC with SPI interface, sharing the same 24-bit SPI protocol as the existing LTC2632/ LTC2634/LTC2636 devices supported by this driver.
The 12-bit variants of LTC2654 reuse existing LTC2634 chip_info structs as they are register-compatible.
Add support for the following variants:
- LTC2654L-16: 16-bit, 2.5V internal reference
- LTC2654L-12: 12-bit, 2.5V internal reference
- LTC2654H-16: 16-bit, 4.096V internal reference
- LTC2654H-12: 12-bit, 4.096V internal reference
--- drivers/iio/dac/ltc2632.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-)
drivers/iio/dac/ltc2632.c +23 -3
@@ -58,8 +58,9 @@ static int ltc2632_spi_write(struct spi_device *spi,* The input shift register is 24 bits wide. * The next four are the command bits, C3 to C0, * followed by the 4-bit DAC address, A3 to A0, and then the -* 12-, 10-, 8-bit data-word. The data-word comprises the 12-, -* 10-, 8-bit input code followed by 4, 6, or 8 don't care bits. +* 16-, 12-, 10-, 8-bit data-word. The data-word comprises the +* 16-, 12-, 10-, 8-bit input code followed by 0, 4, 6, or 8 +* don't care bits. */ data = (cmd <<20 ) | (addr <<16 ) | (val << shift);put_unaligned_be24 (data, &msg[0 ]);
@@ -185,6 +186,7 @@ static const struct iio_chan_spec_ext_info ltc2632_ext_info[] = { LTC2632_CHANNEL(7, _bits), \ } +static DECLARE_LTC2632_CHANNELS(ltc2632x16, 16); static DECLARE_LTC2632_CHANNELS(ltc2632x12, 12); static DECLARE_LTC2632_CHANNELS(ltc2632x10, 10); static DECLARE_LTC2632_CHANNELS(ltc2632x8, 8);
@@ -297,6 +299,18 @@ static const struct ltc2632_chip_info ltc2636h8_chip_info = { .vref_mv = 4096, }; +static const struct ltc2632_chip_info ltc2654l16_chip_info = { + .channels = ltc2632x16_channels, + .num_channels =4 , + .vref_mv =2500 , +}; + +static const struct ltc2632_chip_info ltc2654h16_chip_info = { + .channels = ltc2632x16_channels, + .num_channels =4 , + .vref_mv =4096 , +}; +static int ltc2632_probe (struct spi_device *spi) {struct ltc2632_state *st;
@@ -366,6 +380,10 @@ static const struct spi_device_id ltc2632_id[] = { { "ltc2636-h12", (kernel_ulong_t)<c2636h12_chip_info }, { "ltc2636-h10", (kernel_ulong_t)<c2636h10_chip_info }, { "ltc2636-h8", (kernel_ulong_t)<c2636h8_chip_info }, + { "ltc2654-l16", (kernel_ulong_t)<c2654l16_chip_info }, + { "ltc2654-l12", (kernel_ulong_t)<c2634l12_chip_info }, + { "ltc2654-h16", (kernel_ulong_t)<c2654h16_chip_info }, + { "ltc2654-h12", (kernel_ulong_t)<c2634h12_chip_info }, { } };MODULE_DEVICE_TABLE (spi, ltc2632_id);
@@ -389,6 +407,8 @@ static const struct of_device_id ltc2632_of_match[] = { { .compatible = "lltc,ltc2636-h12", .data = <c2636h12_chip_info }, { .compatible = "lltc,ltc2636-h10", .data = <c2636h10_chip_info }, { .compatible = "lltc,ltc2636-h8", .data = <c2636h8_chip_info }, + { .compatible = "lltc,ltc2654-l16", .data = <c2654l16_chip_info }, + { .compatible = "lltc,ltc2654-h16", .data = <c2654h16_chip_info }, { } };MODULE_DEVICE_TABLE (of, ltc2632_of_match);
@@ -404,5 +424,5 @@ static struct spi_driver ltc2632_driver = {module_spi_driver (ltc2632_driver);MODULE_AUTHOR ("Maxime Roussin-Belanger <[email protected]>" ); -MODULE_DESCRIPTION ("LTC2632 DAC SPI driver" ); +MODULE_DESCRIPTION ("LTC2632/LTC2654 DAC SPI driver" );MODULE_LICENSE ("GPL v2" );
Signature · 1 line
2.50.1
Jonathan Cameron
maintainerQuoted 22 lines · On Fri, 20 Mar 2026 16:09:48 +0100 David Marinović <[email protected]>…
From: David Marinovic <[email protected]>
Add support for the Linear Technology LTC2654 quad DAC family.
The LTC2654 is a 4-channel, 16-/12-bit DAC with SPI interface, sharing the same 24-bit SPI protocol as the existing LTC2632/ LTC2634/LTC2636 devices supported by this driver.
The 12-bit variants of LTC2654 reuse existing LTC2634
chip_infostructs as they are register-compatible.Add support for the following variants:
- LTC2654L-16: 16-bit, 2.5V internal reference
- LTC2654L-12: 12-bit, 2.5V internal reference
- LTC2654H-16: 16-bit, 4.096V internal reference
- LTC2654H-12: 12-bit, 4.096V internal referenceSigned-off-by David Marinovic <[email protected]>
MODULE_DEVICE_TABLE(of, ltc2632_of_match);
drivers/iio/dac/ltc2632.c static struct spi_driver ltc2632_driver = { · line 427
Quoted 5 lines
drivers/iio/dac/ltc2632.c +1
-1@@ -404,5 +424,5 @@ static struct spi_driver ltc2632_driver = {module_spi_driver (ltc2632_driver);MODULE_AUTHOR ("Maxime Roussin-Belanger <[email protected]>" ); -MODULE_DESCRIPTION ("LTC2632 DAC SPI driver" ); +MODULE_DESCRIPTION ("LTC2632/LTC2654 DAC SPI driver" );
I'm going to tweak this to
"LTC2632 and similar DAC SPI driver" because there are already
other parts not listed here. E.g. LTC2634 parts
Quoted 1 line
drivers/iio/dac/ltc2632.c +0
-0MODULE_LICENSE ("GPL v2" );
Jonathan Cameron
maintainerQuoted 6 lines · On Fri, 20 Mar 2026 16:09:45 +0100 David Marinović <[email protected]>…
From: David Marinovic <[email protected]>
Greetings!
This is v3 of the LTC2654 DAC support patch series.
Quoted 8 lines
The LTC2654 is a quad-channel, 16-/12-bit DAC with internal reference voltage and SPI interface, sharing the same 24-bit SPI protocol as the LTC2632/2634/2636 family.
The LTC2654L-16 variant was tested on a Phytec phyCORE-STM32MP1 board with the DAC connected via SPI1. The driver probes successfully and all 4 channels are accessible via IIO sysfs.
Process comment. Don't send new versions in reply to a previous one. It leads to them being well back in people's email history (depending on the client and how it gets sorted) and leads to hard to read threads.
Convention is new version, new email thread.
Thanks,
Jonathan
Quoted 20 lines
Changes in v3:
- Patch 1 unchanged
- DT bindings use fallback compatibles for LTC2654-L12 and LTC2654-H12, which are register-compatible with LTC2634-L12 and LTC2634-H12
- LTC2654-L16 and LTC2654-H16 keep separate compatible strings as no existing compatible supports 16-bit resolution
- 12-bit variants reuse existing LTC2634chip_infostructures, so only two newchip_infostructures are added for 16-bit variantsDavid Marinovic (3):
iio: dac: ltc2632: drop enum and use individualchip_infoobjects
dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings
iio: dac: ltc2632: add support for LTC2654 DAC family.../bindings/iio/dac/lltc,ltc2632.yaml | 12 +- drivers/iio/dac/ltc2632.c | 367 +++++++++--------- 2 files changed, 188 insertions(+), 191 deletions(-)
Jonathan Cameron
maintainerQuoted 14 lines · On Fri, 20 Mar 2026 16:09:45 +0100 David Marinović <[email protected]>…
From: David Marinovic <[email protected]>
Greetings!
This is v3 of the LTC2654 DAC support patch series.
The LTC2654 is a quad-channel, 16-/12-bit DAC with internal reference voltage and SPI interface, sharing the same 24-bit SPI protocol as the LTC2632/2634/2636 family.
The LTC2654L-16 variant was tested on a Phytec phyCORE-STM32MP1 board with the DAC connected via SPI1. The driver probes successfully and all 4 channels are accessible via IIO sysfs.
Quoted 10 lines
Changes in v3:
- Patch 1 unchanged
- DT bindings use fallback compatibles for LTC2654-L12 and LTC2654-H12, which are register-compatible with LTC2634-L12 and LTC2634-H12
- LTC2654-L16 and LTC2654-H16 keep separate compatible strings as no existing compatible supports 16-bit resolution
- 12-bit variants reuse existing LTC2634chip_infostructures, so only two newchip_infostructures are added for 16-bit variants
Applied to the testing branch of iio.git (which will become togreg once the bots let me know if they found any problems).
I made a few minor tweaks as called out in specific patches.
Thanks,
Jonathan
Quoted 10 lines
David Marinovic (3):
iio: dac: ltc2632: drop enum and use individualchip_infoobjects
dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings
iio: dac: ltc2632: add support for LTC2654 DAC family.../bindings/iio/dac/lltc,ltc2632.yaml | 12 +- drivers/iio/dac/ltc2632.c | 367 +++++++++--------- 2 files changed, 188 insertions(+), 191 deletions(-)