.../bindings/iio/adc/lltc,ltc2497.yaml | 9 ++- drivers/iio/adc/Kconfig | 8 ++- drivers/iio/adc/ltc2309.c | 59 ++++++++++++++++--- 3 files changed, 65 insertions(+), 11 deletions(-)
The LTC2305 is a 2-channel, 12-bit, fast ADC with an I2C interface, compatible with the LTC2309 (which has 8 channels). This patch adds support for the LTC2305 by introducing a chip_info structure to handle the different channel configurations between the two variants. The LTC2305 exposes 2 single-ended channels and 2 differential combinations. Also updates the device tree bindings to include the lltc,ltc2305 compatible string and documents it in the Kconfig. --- Changes in v2: - Changed usleep_range() to fsleep() - Added missing #include <linux/array_size.h> header - Removed explicit .read_delay_us = 0 initialization (implicit zero) - Added __counted_by_ptr() annotation to channels pointer - Modified ltc2309 struct to store only read_delay_us value instead of full chip_info pointer, reducing memory overhead - Alphabetically ordered device entries in ID tables (ltc2305 before ltc2309) - Reformatted Kconfig help text with explicit bulleted list of supported devices instead of vague "and similar" language - Added device names to chip_info structure for proper sysfs identification - Split changes into proper preparatory patches before adding new device support - Link to v1: https://lore.kernel.org/all/20260320140819.191700-1-carlosjr.jones@analog.com/ Note: The ltc2309_chip_info structure has a 4-byte hole due to alignment requirements for the __counted_by_ptr() annotation. The count field must precede the pointer field for the bounds checking to work correctly. The total structure size remains 32 bytes either way due to required padding, so the memory overhead is minimal (8 bytes total for both chip variants). --- Carlos Jones Jr (4): iio: adc: ltc2309: Introduce chip_info structure iio: adc: ltc2309: Use i2c_get_match_data() helper dt-bindings: iio: adc: ltc2497: Add LTC2305 compatible iio: adc: ltc2309: Add LTC2305 support .../bindings/iio/adc/lltc,ltc2497.yaml | 9 ++- drivers/iio/adc/Kconfig | 8 ++- drivers/iio/adc/ltc2309.c | 59 ++++++++++++++++--- 3 files changed, 65 insertions(+), 11 deletions(-) -- 2.43.0
On Tue, 24 Mar 2026 15:13:27 +0800 Carlos Jones Jr <carlosjr.jones@analog.com> wrote: > The LTC2305 is a 2-channel, 12-bit, fast ADC with an I2C interface, > compatible with the LTC2309 (which has 8 channels). > > This patch adds support for the LTC2305 by introducing a chip_info > structure to handle the different channel configurations between the two > variants. The LTC2305 exposes 2 single-ended channels and 2 differential > combinations. > > Also updates the device tree bindings to include the lltc,ltc2305 > compatible string and documents it in the Kconfig. > --- Whilst checking for what comments were in v1, I realized we have two different people looking at the same thing within a few weeks of each other. +cc Kyle. https://lore.kernel.org/all/20260325-add_ltc2305_driver-v5-0-e0d29daa54f9@gmail.com/#r I guess this is just a case of neither noticing on the list? Too many similar part names, so I missed it until now. Currently I have Kyle's patches queued up. All else being equal that seems fair as Kyle started on this last year whereas Carlos' work on this is much more recent. I'm seeing some small differences. Please could you work together on this. Ideally send any additional changes on top of Kyle's series. Thanks, Jonathan > Changes in v2: > - Changed usleep_range() to fsleep() > - Added missing #include <linux/array_size.h> header > - Removed explicit .read_delay_us = 0 initialization (implicit zero) > - Added __counted_by_ptr() annotation to channels pointer > - Modified ltc2309 struct to store only read_delay_us value instead > of full chip_info pointer, reducing memory overhead > - Alphabetically ordered device entries in ID tables (ltc2305 > before ltc2309) > - Reformatted Kconfig help text with explicit bulleted list of > supported devices instead of vague "and similar" language > - Added device names to chip_info structure for proper sysfs > identification > - Split changes into proper preparatory patches before adding > new device support > - Link to v1: https://lore.kernel.org/all/20260320140819.191700-1-carlosjr.jones@analog.com/ > > Note: > The ltc2309_chip_info structure has a 4-byte hole due to alignment > requirements for the __counted_by_ptr() annotation. The count field > must precede the pointer field for the bounds checking to work correctly. > The total structure size remains 32 bytes either way due to required > padding, so the memory overhead is minimal (8 bytes total for both chip > variants). > --- > Carlos Jones Jr (4): > iio: adc: ltc2309: Introduce chip_info structure > iio: adc: ltc2309: Use i2c_get_match_data() helper > dt-bindings: iio: adc: ltc2497: Add LTC2305 compatible > iio: adc: ltc2309: Add LTC2305 support > > .../bindings/iio/adc/lltc,ltc2497.yaml | 9 ++- > drivers/iio/adc/Kconfig | 8 ++- > drivers/iio/adc/ltc2309.c | 59 ++++++++++++++++--- > 3 files changed, 65 insertions(+), 11 deletions(-) >
© 2016 - 2026 Red Hat, Inc.