Re: [PATCH v2 7/7] iio: temperature: ltc2983: Add support for ADT7604
From: Francesco Lavra
Date: Fri May 15 2026 - 04:49:33 EST
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.
> @@ -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.