RE: [PATCH v2 7/7] iio: temperature: ltc2983: Add support for ADT7604
From: Stan, Liviu
Date: Fri May 15 2026 - 05:29:51 EST
Thanks for the review.
On Fri, May 15, 2026, Francesco Lavra wrote:
> On Thu, 2026-05-14 at 17:46 +0300, Liviu Stan wrote:
> > @@ -1269,6 +1579,16 @@ static int ltc2983_read_raw(struct iio_dev
> > *indio_dev,
> > /* 2^21 */
> > *val2 = 2097152;
> > return IIO_VAL_FRACTIONAL;
> > + case IIO_RESISTANCE:
> > + /* value in ohm, 10 fractional bits: divide by
> > 2^10 */
> > + *val = 1;
> > + *val2 = 1024;
> > + return IIO_VAL_FRACTIONAL;
> > + case IIO_COVERAGE_PERCENT:
> > + /* value in percent, 10 fractional bits: divide
> > by 2^10 */
> > + *val = 1;
> > + *val2 = 1024;
> > + return IIO_VAL_FRACTIONAL;
>
> The above two branches are identical, you might want to just stack their
> labels.
Understood, will change in v3.
>
>
> > @@ -1658,25 +2018,34 @@ static
> DEFINE_SIMPLE_DEV_PM_OPS(ltc2983_pm_ops,
> > ltc2983_suspend,
> > static const struct ltc2983_chip_info ltc2983_chip_info_data = {
> > .name = "ltc2983",
> > .max_channels_nr = 20,
> > + .supported_sensors = LTC2983_COMMON_SENSORS,
> > };
> >
> > static const struct ltc2983_chip_info ltc2984_chip_info_data = {
> > .name = "ltc2984",
> > .max_channels_nr = 20,
> > + .supported_sensors = LTC2983_COMMON_SENSORS,
> > .has_eeprom = true,
> > };
> >
> > static const struct ltc2983_chip_info ltc2986_chip_info_data = {
> > .name = "ltc2986",
> > .max_channels_nr = 10,
> > - .has_temp = true,
> > + .supported_sensors = LTC2983_COMMON_SENSORS |
> > BIT_ULL(LTC2983_SENSOR_ACTIVE_TEMP),
> > .has_eeprom = true,
> > };
> >
> > static const struct ltc2983_chip_info ltm2985_chip_info_data = {
> > .name = "ltm2985",
> > .max_channels_nr = 10,
> > - .has_temp = true,
> > + .supported_sensors = LTC2983_COMMON_SENSORS |
> > BIT_ULL(LTC2983_SENSOR_ACTIVE_TEMP),
> > + .has_eeprom = true,
>
> You almost certainly didn't mean to add this line.
The has_eeprom = true for ltm2985 was already present before the
patch. It can be seen at the end of adt7604 chip_info struct in the diff.
But I can edit the hunk in v3 to have adt7604_chip_info_data appear
as a clean new block and make the diff clearer.
Thanks,
Liviu