diff options
| author | Salah Triki <salah.triki@gmail.com> | 2026-09-17 12:01:20 +0100 |
|---|---|---|
| committer | Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> | 2026-11-02 00:39:04 +0000 |
| commit | 4d4e75b3074bc29525c963a81c19471528f29a45 (patch) | |
| tree | 2e26d54ff852486ea765476da8d677f63996b339 /tools/perf/scripts/python | |
| parent | 0a570feeca37d85fbfd6b4f6e3d9f33e1461c634 (diff) | |
iio: temperature: mlx90614: Fix dual channel probe condition check
In mlx90614_probe_num_ir_sensors(), the check on chip_info->dual_channel
is inverted.
Currently, if dual_channel is true (MLX90614), the function returns 0
immediately without checking op_eeprom_config1. This forces all MLX90614
devices to be registered as single sensor (num_channels = 2), making the
second object temperature channel inaccessible.
Conversely, if dual_channel is false (MLX90615), the function skips the
early return and performs an unnecessary SMBus read on EEPROM CONFIG1 even
though MLX90615 does not support dual channel operation.
Fix this by negating the condition so that single-channel chips return
early with 0, while dual-channel capable chips (MLX90614) proceed to read
the EEPROM configuration register to detect whether 1 or 2 object channels
are present.
Fixes: 3d5ead238bc8 ("iio: mlx90614: Factor our register IO and constants into model specific descriptor")
Signed-off-by: Salah Triki <salah.triki@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
