iio: adc: ltc2309: add support for LTC2305#3171
iio: adc: ltc2309: add support for LTC2305#3171cjones-adi wants to merge 3 commits intoanalogdevicesinc:mainfrom
Conversation
gastmaier
left a comment
There was a problem hiding this comment.
Thank you! no changes necessary to the patch series
Can you submit upstream using the b4 tool? You have to add a cover letter that is pretty much the pull request description.
https://analogdevicesinc.github.io/linux/contribute.html
please base on top of the current jic23/iio/testing or tag Linux 7.0-rc1
If you have issues, don't hesitate to ask for help
nunojsa
left a comment
There was a problem hiding this comment.
Some minor comments. You can take them and send it upstream as mentioned
drivers/iio/adc/Kconfig
Outdated
| Say yes here to build support for Linear Technology LTC2309, a low | ||
| noise, low power, 8-channel, 12-bit SAR ADC | ||
| Say yes here to build support for Linear Technology LTC2305 and | ||
| LTC2309, low noise, low power, 2-/8-channel, 12-bit SAR ADCs. |
There was a problem hiding this comment.
Maybe just go with LTC2309 and similar low noise, low power SAR ADCs. Like this it does not scale too much
There was a problem hiding this comment.
Thanks. I've revised as advised. I also applied same change in the title of the affected yaml file.
drivers/iio/adc/ltc2309.c
Outdated
|
|
||
| MODULE_AUTHOR("Liam Beguin <liambeguin@gmail.com>"); | ||
| MODULE_DESCRIPTION("Linear Technology LTC2309 ADC"); | ||
| MODULE_DESCRIPTION("Linear Technology LTC2305/LTC2309 ADC"); |
There was a problem hiding this comment.
Thanks. I've revised as advised.
| .num_channels = ARRAY_SIZE(ltc2305_channels), | ||
| .read_delay_us = 2, | ||
| }, | ||
| }; |
There was a problem hiding this comment.
Preferred way in IIO is to have a variable per chip. Not an array. Also adding the chip_info struct could (and should) be a preparatory patch.
There was a problem hiding this comment.
Noted and thanks. Added the preparatory patch and separated the array into their own variables.
drivers/iio/adc/ltc2309.c
Outdated
|
|
||
| chip_info = i2c_get_match_data(client); | ||
| if (!chip_info) | ||
| return -ENODEV; |
There was a problem hiding this comment.
There's no way for the above to happen. If I'm not mistake last decision on this was to not do any error check.
This is a preparatory patch that introduces a chip_info structure to the LTC2309 driver to facilitate adding support for additional chip variants with different channel configurations and timing requirements. The chip_info structure contains chip-specific data including the channel specifications, number of channels, and read delay timing. This change does not modify the existing LTC2309 functionality. Signed-off-by: Carlos Jones <carlosjr.jones@analog.com>
Add support for the LTC2305 2-channel, 12-bit ADC to the existing LTC2497 device tree bindings. The LTC2305 is compatible with the LTC2309 driver implementation. Signed-off-by: Carlos Jones <carlosjr.jones@analog.com>
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 using the chip_info structure to handle the different channel configurations between the two variants. The LTC2305 exposes 2 single-ended channels and 2 differential combinations. The LTC2305 requires a 1.6μs delay between I2C write and read operations, which is implemented using chip-specific timing to avoid affecting existing LTC2309 functionality. Signed-off-by: Carlos Jones <carlosjr.jones@analog.com>
PR Description
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.
PR Type
PR Checklist