]> git.ipfire.org Git - thirdparty/linux.git/commit
iio: adc: ad4080: prepare driver for multi-part support
authorAntoniu Miclaus <antoniu.miclaus@analog.com>
Tue, 7 Oct 2025 11:15:21 +0000 (11:15 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 19 Oct 2025 10:59:21 +0000 (11:59 +0100)
commit69ca4df3491a9475fa2f92ce711f5a21cd26a4a9
tree86dc9a00571089d45c55acc9edf98d438edd6519
parentb66cddc8be7278fd14650ff9182f3794397f8b31
iio: adc: ad4080: prepare driver for multi-part support

Refactor the ad4080 driver to support multiple ADC variants with
different resolution bits and LVDS CNV clock count maximums.

Changes:
- Add lvds_cnv_clk_cnt_max field to chip_info structure
- Create AD4080_CHANNEL_DEFINE macro for variable resolution/storage bits
- Make LVDS CNV clock count configurable per chip variant
- Use chip_info->product_id for chip identification comparison

This prepares the infrastructure for adding support for additional
ADC parts with different specifications while maintaining backward
compatibility with existing AD4080 functionality.

Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad4080.c