* [PATCH 2/2] dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings [not found] <5d4fb8998d9634c3e5a8ed17b80dae07@pupin.rs> @ 2026-03-10 15:32 ` David Marinović 2026-03-11 13:03 ` Krzysztof Kozlowski 2026-03-11 13:04 ` Krzysztof Kozlowski 2026-03-18 13:57 ` [PATCH v2 0/3] iio: dac: ltc2632: add support for LTC2654 DAC family David Marinović 1 sibling, 2 replies; 18+ messages in thread From: David Marinović @ 2026-03-10 15:32 UTC (permalink / raw) To: jic23 Cc: jic23, dlechner, nuno.sa, andy, linux-iio, linux-kernel, robh, krzk+dt, conor+dt, michael.hennerich, devicetree Add DT compatible strings for the LTC2654 DAC family variants supported by the ltc2632 driver. Signed-off-by: David Marinovic <david.marinovic@pupin.rs> --- .../devicetree/bindings/iio/dac/lltc,ltc2632.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/dac/lltc,ltc2632.yaml b/Documentation/devicetree/bindings/iio/dac/lltc,ltc2632.yaml index 733edc7d6d17..7ec663beec1a 100644 --- a/Documentation/devicetree/bindings/iio/dac/lltc,ltc2632.yaml +++ b/Documentation/devicetree/bindings/iio/dac/lltc,ltc2632.yaml @@ -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 <michael.hennerich@analog.com> 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ć <david.marinovic@pupin.rs> To: jic23@kernel.org 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 Signed-off-by: David Marinovic <david.marinovic@pupin.rs> ^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 2/2] dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings 2026-03-10 15:32 ` [PATCH 2/2] dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings David Marinović @ 2026-03-11 13:03 ` Krzysztof Kozlowski 2026-03-11 13:04 ` Krzysztof Kozlowski 1 sibling, 0 replies; 18+ messages in thread From: Krzysztof Kozlowski @ 2026-03-11 13:03 UTC (permalink / raw) To: David Marinović Cc: jic23, dlechner, nuno.sa, andy, linux-iio, linux-kernel, robh, krzk+dt, conor+dt, michael.hennerich, devicetree On Tue, Mar 10, 2026 at 04:32:05PM +0100, David Marinović wrote: > Add DT compatible strings for the LTC2654 DAC family variants > supported by the ltc2632 driver. Describe hardware, not driver. > > Signed-off-by: David Marinovic <david.marinovic@pupin.rs> > --- > .../devicetree/bindings/iio/dac/lltc,ltc2632.yaml | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/Documentation/devicetree/bindings/iio/dac/lltc,ltc2632.yaml > b/Documentation/devicetree/bindings/iio/dac/lltc,ltc2632.yaml > index 733edc7d6d17..7ec663beec1a 100644 > --- a/Documentation/devicetree/bindings/iio/dac/lltc,ltc2632.yaml > +++ b/Documentation/devicetree/bindings/iio/dac/lltc,ltc2632.yaml > @@ -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 There are multiple patch errors here. This is unmergeable. > > maintainers: > - Michael Hennerich <michael.hennerich@analog.com> > > 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 Several look compatible to me, so express it with fallback and drop unneeded entries in the driver. > > 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ć <david.marinovic@pupin.rs> > To: jic23@kernel.org > > 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 > > Signed-off-by: David Marinovic <david.marinovic@pupin.rs> What is this? ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/2] dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings 2026-03-10 15:32 ` [PATCH 2/2] dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings David Marinović 2026-03-11 13:03 ` Krzysztof Kozlowski @ 2026-03-11 13:04 ` Krzysztof Kozlowski 1 sibling, 0 replies; 18+ messages in thread From: Krzysztof Kozlowski @ 2026-03-11 13:04 UTC (permalink / raw) To: David Marinović Cc: jic23, dlechner, nuno.sa, andy, linux-iio, linux-kernel, robh, krzk+dt, conor+dt, michael.hennerich, devicetree On Tue, Mar 10, 2026 at 04:32:05PM +0100, David Marinović wrote: > Add DT compatible strings for the LTC2654 DAC family variants > supported by the ltc2632 driver. > > Signed-off-by: David Marinovic <david.marinovic@pupin.rs> > --- > .../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 ^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH v2 0/3] iio: dac: ltc2632: add support for LTC2654 DAC family [not found] <5d4fb8998d9634c3e5a8ed17b80dae07@pupin.rs> 2026-03-10 15:32 ` [PATCH 2/2] dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings David Marinović @ 2026-03-18 13:57 ` David Marinović 2026-03-18 13:57 ` [PATCH 1/3] iio: dac: ltc2632: drop enum and use individual chip_info objects David Marinović ` (3 more replies) 1 sibling, 4 replies; 18+ messages in thread From: David Marinović @ 2026-03-18 13:57 UTC (permalink / raw) To: jic23 Cc: andriy.shevchenko, dlechner, nuno.sa, robh, krzk+dt, conor+dt, michael.hennerich, linux-iio, devicetree, linux-kernel, David Marinovic From: David Marinovic <david.marinovic@pupin.rs> 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(-) -- 2.50.1 ^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 1/3] iio: dac: ltc2632: drop enum and use individual chip_info objects 2026-03-18 13:57 ` [PATCH v2 0/3] iio: dac: ltc2632: add support for LTC2654 DAC family David Marinović @ 2026-03-18 13:57 ` David Marinović 2026-03-18 14:57 ` Andy Shevchenko 2026-03-18 13:57 ` [PATCH 2/3] dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings David Marinović ` (2 subsequent siblings) 3 siblings, 1 reply; 18+ messages in thread From: David Marinović @ 2026-03-18 13:57 UTC (permalink / raw) To: jic23 Cc: andriy.shevchenko, dlechner, nuno.sa, robh, krzk+dt, conor+dt, michael.hennerich, linux-iio, devicetree, linux-kernel, David Marinovic From: David Marinovic <david.marinovic@pupin.rs> 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. Signed-off-by: David Marinovic <david.marinovic@pupin.rs> --- drivers/iio/dac/ltc2632.c | 327 +++++++++++++++++--------------------- 1 file changed, 142 insertions(+), 185 deletions(-) diff --git a/drivers/iio/dac/ltc2632.c b/drivers/iio/dac/ltc2632.c index 105f939f7e54..ca0b88285ce5 100644 --- a/drivers/iio/dac/ltc2632.c +++ b/drivers/iio/dac/ltc2632.c @@ -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); -- 2.50.1 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 1/3] iio: dac: ltc2632: drop enum and use individual chip_info objects 2026-03-18 13:57 ` [PATCH 1/3] iio: dac: ltc2632: drop enum and use individual chip_info objects David Marinović @ 2026-03-18 14:57 ` Andy Shevchenko 0 siblings, 0 replies; 18+ messages in thread From: Andy Shevchenko @ 2026-03-18 14:57 UTC (permalink / raw) To: David Marinović Cc: jic23, dlechner, nuno.sa, robh, krzk+dt, conor+dt, michael.hennerich, linux-iio, devicetree, linux-kernel On Wed, Mar 18, 2026 at 02:57:30PM +0100, David Marinović wrote: > 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. Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> (I have not reviewed that scrupulously, but at the brief look for the values and names LGTM.) -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 2/3] dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings 2026-03-18 13:57 ` [PATCH v2 0/3] iio: dac: ltc2632: add support for LTC2654 DAC family David Marinović 2026-03-18 13:57 ` [PATCH 1/3] iio: dac: ltc2632: drop enum and use individual chip_info objects David Marinović @ 2026-03-18 13:57 ` David Marinović 2026-03-18 17:38 ` Conor Dooley 2026-03-18 13:57 ` [PATCH 3/3] iio: dac: ltc2632: add support for LTC2654 DAC family David Marinović 2026-03-20 15:09 ` [PATCH v3 0/3] " David Marinović 3 siblings, 1 reply; 18+ messages in thread From: David Marinović @ 2026-03-18 13:57 UTC (permalink / raw) To: jic23 Cc: andriy.shevchenko, dlechner, nuno.sa, robh, krzk+dt, conor+dt, michael.hennerich, linux-iio, devicetree, linux-kernel, David Marinovic From: David Marinovic <david.marinovic@pupin.rs> 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 Signed-off-by: David Marinovic <david.marinovic@pupin.rs> --- .../devicetree/bindings/iio/dac/lltc,ltc2632.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/dac/lltc,ltc2632.yaml b/Documentation/devicetree/bindings/iio/dac/lltc,ltc2632.yaml index 733edc7d6d17..b22df24dee07 100644 --- a/Documentation/devicetree/bindings/iio/dac/lltc,ltc2632.yaml +++ b/Documentation/devicetree/bindings/iio/dac/lltc,ltc2632.yaml @@ -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 <michael.hennerich@analog.com> 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 -- 2.50.1 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 2/3] dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings 2026-03-18 13:57 ` [PATCH 2/3] dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings David Marinović @ 2026-03-18 17:38 ` Conor Dooley 0 siblings, 0 replies; 18+ messages in thread From: Conor Dooley @ 2026-03-18 17:38 UTC (permalink / raw) To: David Marinović Cc: jic23, andriy.shevchenko, dlechner, nuno.sa, robh, krzk+dt, conor+dt, michael.hennerich, linux-iio, devicetree, linux-kernel [-- Attachment #1: Type: text/plain, Size: 2424 bytes --] On Wed, Mar 18, 2026 at 02:57:31PM +0100, David Marinović wrote: > From: David Marinovic <david.marinovic@pupin.rs> > > 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. > > 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 > > Signed-off-by: David Marinovic <david.marinovic@pupin.rs> > --- > .../devicetree/bindings/iio/dac/lltc,ltc2632.yaml | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) > > diff --git a/Documentation/devicetree/bindings/iio/dac/lltc,ltc2632.yaml b/Documentation/devicetree/bindings/iio/dac/lltc,ltc2632.yaml > index 733edc7d6d17..b22df24dee07 100644 > --- a/Documentation/devicetree/bindings/iio/dac/lltc,ltc2632.yaml > +++ b/Documentation/devicetree/bindings/iio/dac/lltc,ltc2632.yaml > @@ -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 <michael.hennerich@analog.com> > > 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 > -- > 2.50.1 > [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 3/3] iio: dac: ltc2632: add support for LTC2654 DAC family 2026-03-18 13:57 ` [PATCH v2 0/3] iio: dac: ltc2632: add support for LTC2654 DAC family David Marinović 2026-03-18 13:57 ` [PATCH 1/3] iio: dac: ltc2632: drop enum and use individual chip_info objects David Marinović 2026-03-18 13:57 ` [PATCH 2/3] dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings David Marinović @ 2026-03-18 13:57 ` David Marinović 2026-03-20 15:09 ` [PATCH v3 0/3] " David Marinović 3 siblings, 0 replies; 18+ messages in thread From: David Marinović @ 2026-03-18 13:57 UTC (permalink / raw) To: jic23 Cc: andriy.shevchenko, dlechner, nuno.sa, robh, krzk+dt, conor+dt, michael.hennerich, linux-iio, devicetree, linux-kernel, David Marinovic From: David Marinovic <david.marinovic@pupin.rs> 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 Signed-off-by: David Marinovic <david.marinovic@pupin.rs> --- drivers/iio/dac/ltc2632.c | 40 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/drivers/iio/dac/ltc2632.c b/drivers/iio/dac/ltc2632.c index ca0b88285ce5..c84a7e314f08 100644 --- a/drivers/iio/dac/ltc2632.c +++ b/drivers/iio/dac/ltc2632.c @@ -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 <maxime.roussinbelanger@gmail.com>"); -MODULE_DESCRIPTION("LTC2632 DAC SPI driver"); +MODULE_DESCRIPTION("LTC2632/LTC2654 DAC SPI driver"); MODULE_LICENSE("GPL v2"); -- 2.50.1 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH v3 0/3] iio: dac: ltc2632: add support for LTC2654 DAC family 2026-03-18 13:57 ` [PATCH v2 0/3] iio: dac: ltc2632: add support for LTC2654 DAC family David Marinović ` (2 preceding siblings ...) 2026-03-18 13:57 ` [PATCH 3/3] iio: dac: ltc2632: add support for LTC2654 DAC family David Marinović @ 2026-03-20 15:09 ` David Marinović 2026-03-20 15:09 ` [PATCH v3 1/3] iio: dac: ltc2632: drop enum and use individual chip_info objects David Marinović ` (4 more replies) 3 siblings, 5 replies; 18+ messages in thread From: David Marinović @ 2026-03-20 15:09 UTC (permalink / raw) To: jic23 Cc: andriy.shevchenko, dlechner, nuno.sa, robh, krzk+dt, conor+dt, michael.hennerich, linux-iio, devicetree, linux-kernel, David Marinovic From: David Marinovic <david.marinovic@pupin.rs> 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(-) -- 2.50.1 ^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH v3 1/3] iio: dac: ltc2632: drop enum and use individual chip_info objects 2026-03-20 15:09 ` [PATCH v3 0/3] " David Marinović @ 2026-03-20 15:09 ` David Marinović 2026-03-20 15:09 ` [PATCH v3 2/3] dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings David Marinović ` (3 subsequent siblings) 4 siblings, 0 replies; 18+ messages in thread From: David Marinović @ 2026-03-20 15:09 UTC (permalink / raw) To: jic23 Cc: andriy.shevchenko, dlechner, nuno.sa, robh, krzk+dt, conor+dt, michael.hennerich, linux-iio, devicetree, linux-kernel, David Marinovic From: David Marinovic <david.marinovic@pupin.rs> 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. Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: David Marinovic <david.marinovic@pupin.rs> --- drivers/iio/dac/ltc2632.c | 327 +++++++++++++++++--------------------- 1 file changed, 142 insertions(+), 185 deletions(-) diff --git a/drivers/iio/dac/ltc2632.c b/drivers/iio/dac/ltc2632.c index 105f939f7e54..ca0b88285ce5 100644 --- a/drivers/iio/dac/ltc2632.c +++ b/drivers/iio/dac/ltc2632.c @@ -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); -- 2.50.1 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH v3 2/3] dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings 2026-03-20 15:09 ` [PATCH v3 0/3] " David Marinović 2026-03-20 15:09 ` [PATCH v3 1/3] iio: dac: ltc2632: drop enum and use individual chip_info objects David Marinović @ 2026-03-20 15:09 ` David Marinović 2026-03-20 17:20 ` Conor Dooley 2026-03-20 15:09 ` [PATCH v3 3/3] iio: dac: ltc2632: add support for LTC2654 DAC family David Marinović ` (2 subsequent siblings) 4 siblings, 1 reply; 18+ messages in thread From: David Marinović @ 2026-03-20 15:09 UTC (permalink / raw) To: jic23 Cc: andriy.shevchenko, dlechner, nuno.sa, robh, krzk+dt, conor+dt, michael.hennerich, linux-iio, devicetree, linux-kernel, David Marinovic From: David Marinovic <david.marinovic@pupin.rs> 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) Signed-off-by: David Marinovic <david.marinovic@pupin.rs> --- .../bindings/iio/dac/lltc,ltc2632.yaml | 57 ++++++++++++------- 1 file changed, 35 insertions(+), 22 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/dac/lltc,ltc2632.yaml b/Documentation/devicetree/bindings/iio/dac/lltc,ltc2632.yaml index 733edc7d6d17..50a9cbb44e36 100644 --- a/Documentation/devicetree/bindings/iio/dac/lltc,ltc2632.yaml +++ b/Documentation/devicetree/bindings/iio/dac/lltc,ltc2632.yaml @@ -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 <michael.hennerich@analog.com> 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 -- 2.50.1 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH v3 2/3] dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings 2026-03-20 15:09 ` [PATCH v3 2/3] dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings David Marinović @ 2026-03-20 17:20 ` Conor Dooley 2026-03-21 15:39 ` Jonathan Cameron 0 siblings, 1 reply; 18+ messages in thread From: Conor Dooley @ 2026-03-20 17:20 UTC (permalink / raw) To: David Marinović Cc: jic23, andriy.shevchenko, dlechner, nuno.sa, robh, krzk+dt, conor+dt, michael.hennerich, linux-iio, devicetree, linux-kernel [-- Attachment #1: Type: text/plain, Size: 1317 bytes --] On Fri, Mar 20, 2026 at 04:09:47PM +0100, David Marinović wrote: > From: David Marinovic <david.marinovic@pupin.rs> > > 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) No idea what this section is doing, could probably cull it if there's another version. Acked-by: Conor Dooley <conor.dooley@microchip.com> 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. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v3 2/3] dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings 2026-03-20 17:20 ` Conor Dooley @ 2026-03-21 15:39 ` Jonathan Cameron 0 siblings, 0 replies; 18+ messages in thread From: Jonathan Cameron @ 2026-03-21 15:39 UTC (permalink / raw) To: Conor Dooley Cc: David Marinović, andriy.shevchenko, dlechner, nuno.sa, robh, krzk+dt, conor+dt, michael.hennerich, linux-iio, devicetree, linux-kernel On Fri, 20 Mar 2026 17:20:28 +0000 Conor Dooley <conor@kernel.org> wrote: > On Fri, Mar 20, 2026 at 04:09:47PM +0100, David Marinović wrote: > > From: David Marinovic <david.marinovic@pupin.rs> > > > > 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) > > No idea what this section is doing, could probably cull it if there's > another version. I dropped that section whilst applying. > Acked-by: Conor Dooley <conor.dooley@microchip.com> > 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. ^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH v3 3/3] iio: dac: ltc2632: add support for LTC2654 DAC family 2026-03-20 15:09 ` [PATCH v3 0/3] " David Marinović 2026-03-20 15:09 ` [PATCH v3 1/3] iio: dac: ltc2632: drop enum and use individual chip_info objects David Marinović 2026-03-20 15:09 ` [PATCH v3 2/3] dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings David Marinović @ 2026-03-20 15:09 ` David Marinović 2026-03-21 15:38 ` Jonathan Cameron 2026-03-21 15:30 ` [PATCH v3 0/3] " Jonathan Cameron 2026-03-21 15:41 ` Jonathan Cameron 4 siblings, 1 reply; 18+ messages in thread From: David Marinović @ 2026-03-20 15:09 UTC (permalink / raw) To: jic23 Cc: andriy.shevchenko, dlechner, nuno.sa, robh, krzk+dt, conor+dt, michael.hennerich, linux-iio, devicetree, linux-kernel, David Marinovic From: David Marinovic <david.marinovic@pupin.rs> 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 Signed-off-by: David Marinovic <david.marinovic@pupin.rs> --- drivers/iio/dac/ltc2632.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/drivers/iio/dac/ltc2632.c b/drivers/iio/dac/ltc2632.c index ca0b88285ce5..33b8ff78c6e3 100644 --- a/drivers/iio/dac/ltc2632.c +++ b/drivers/iio/dac/ltc2632.c @@ -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 <maxime.roussinbelanger@gmail.com>"); -MODULE_DESCRIPTION("LTC2632 DAC SPI driver"); +MODULE_DESCRIPTION("LTC2632/LTC2654 DAC SPI driver"); MODULE_LICENSE("GPL v2"); -- 2.50.1 ^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH v3 3/3] iio: dac: ltc2632: add support for LTC2654 DAC family 2026-03-20 15:09 ` [PATCH v3 3/3] iio: dac: ltc2632: add support for LTC2654 DAC family David Marinović @ 2026-03-21 15:38 ` Jonathan Cameron 0 siblings, 0 replies; 18+ messages in thread From: Jonathan Cameron @ 2026-03-21 15:38 UTC (permalink / raw) To: David Marinović Cc: andriy.shevchenko, dlechner, nuno.sa, robh, krzk+dt, conor+dt, michael.hennerich, linux-iio, devicetree, linux-kernel On Fri, 20 Mar 2026 16:09:48 +0100 David Marinović <david.marinovic@pupin.rs> wrote: > From: David Marinovic <david.marinovic@pupin.rs> > > 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 > > Signed-off-by: David Marinovic <david.marinovic@pupin.rs> > 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 <maxime.roussinbelanger@gmail.com>"); > -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 > MODULE_LICENSE("GPL v2"); ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v3 0/3] iio: dac: ltc2632: add support for LTC2654 DAC family 2026-03-20 15:09 ` [PATCH v3 0/3] " David Marinović ` (2 preceding siblings ...) 2026-03-20 15:09 ` [PATCH v3 3/3] iio: dac: ltc2632: add support for LTC2654 DAC family David Marinović @ 2026-03-21 15:30 ` Jonathan Cameron 2026-03-21 15:41 ` Jonathan Cameron 4 siblings, 0 replies; 18+ messages in thread From: Jonathan Cameron @ 2026-03-21 15:30 UTC (permalink / raw) To: David Marinović Cc: andriy.shevchenko, dlechner, nuno.sa, robh, krzk+dt, conor+dt, michael.hennerich, linux-iio, devicetree, linux-kernel On Fri, 20 Mar 2026 16:09:45 +0100 David Marinović <david.marinovic@pupin.rs> wrote: > From: David Marinovic <david.marinovic@pupin.rs> > > 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. > 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 > 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(-) > ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v3 0/3] iio: dac: ltc2632: add support for LTC2654 DAC family 2026-03-20 15:09 ` [PATCH v3 0/3] " David Marinović ` (3 preceding siblings ...) 2026-03-21 15:30 ` [PATCH v3 0/3] " Jonathan Cameron @ 2026-03-21 15:41 ` Jonathan Cameron 4 siblings, 0 replies; 18+ messages in thread From: Jonathan Cameron @ 2026-03-21 15:41 UTC (permalink / raw) To: David Marinović Cc: andriy.shevchenko, dlechner, nuno.sa, robh, krzk+dt, conor+dt, michael.hennerich, linux-iio, devicetree, linux-kernel On Fri, 20 Mar 2026 16:09:45 +0100 David Marinović <david.marinovic@pupin.rs> wrote: > From: David Marinovic <david.marinovic@pupin.rs> > > 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 > 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 > > 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(-) > ^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2026-03-21 15:41 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <5d4fb8998d9634c3e5a8ed17b80dae07@pupin.rs>
2026-03-10 15:32 ` [PATCH 2/2] dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings David Marinović
2026-03-11 13:03 ` Krzysztof Kozlowski
2026-03-11 13:04 ` Krzysztof Kozlowski
2026-03-18 13:57 ` [PATCH v2 0/3] iio: dac: ltc2632: add support for LTC2654 DAC family David Marinović
2026-03-18 13:57 ` [PATCH 1/3] iio: dac: ltc2632: drop enum and use individual chip_info objects David Marinović
2026-03-18 14:57 ` Andy Shevchenko
2026-03-18 13:57 ` [PATCH 2/3] dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings David Marinović
2026-03-18 17:38 ` Conor Dooley
2026-03-18 13:57 ` [PATCH 3/3] iio: dac: ltc2632: add support for LTC2654 DAC family David Marinović
2026-03-20 15:09 ` [PATCH v3 0/3] " David Marinović
2026-03-20 15:09 ` [PATCH v3 1/3] iio: dac: ltc2632: drop enum and use individual chip_info objects David Marinović
2026-03-20 15:09 ` [PATCH v3 2/3] dt-bindings: iio: dac: ltc2632: add LTC2654 compatible strings David Marinović
2026-03-20 17:20 ` Conor Dooley
2026-03-21 15:39 ` Jonathan Cameron
2026-03-20 15:09 ` [PATCH v3 3/3] iio: dac: ltc2632: add support for LTC2654 DAC family David Marinović
2026-03-21 15:38 ` Jonathan Cameron
2026-03-21 15:30 ` [PATCH v3 0/3] " Jonathan Cameron
2026-03-21 15:41 ` Jonathan Cameron
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox