Re: [PATCH v4 2/2] iio: adc: ltc2309: add support for ltc2305

From: Andy Shevchenko

Date: Wed Mar 11 2026 - 03:31:28 EST


On Wed, Mar 11, 2026 at 09:43:02AM +0800, Kyle Hsieh wrote:
> Add support for the 2-channel LTC2305 ADC in the existing LTC2309 driver.
> The LTC2305 and LTC2309 share similar features: both are 12-bit,
> low-noise, low-power SAR ADCs with an I2C interface.
> The main difference is the number of channels: LTC2305 has 2 channels,
> while LTC2309 has 8 channels.

...

> /* Order matches expected channel address, See datasheet Table 1. */

This comment now confusing, it should be kept at the initial enum, but the
better idea is...

> +enum ltc2305_channels {
> + LTC2305_CH0_CH1 = 0x0,
> + LTC2305_CH1_CH0 = 0x4,
> + LTC2305_CH0 = 0x8,
> + LTC2305_CH1 = 0xc,
> +};
> +
> enum ltc2309_channels {
> LTC2309_CH0_CH1 = 0,
> LTC2309_CH2_CH3,

...to assign proper values (in necessary order) explicitly and adjust comment.
Then add this patch on top.

> }

--
With Best Regards,
Andy Shevchenko