aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2022-02-06 19:03:23 +0000
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-02-21 19:33:05 +0000
commitd2960145b37643970b53c60fa94fbf5c26f6eddf (patch)
tree9a722e50bee2d0b013fcb77e27efc4720c37f55b /drivers/staging/iio
parentstaging:iio:adc:ad7280a: Use device properties to replace platform data. (diff)
downloadlinux-dev-d2960145b37643970b53c60fa94fbf5c26f6eddf.tar.xz
linux-dev-d2960145b37643970b53c60fa94fbf5c26f6eddf.zip
staging:iio:adc:ad7280a: Drop buggy support for early termination of AUX alert.
This functionality is intended to allow for a few temperature sensors to be missing (and hence not worth reading) on the final device in a chain. The ones removed are 3 and 5 (unlike for the ADC channels where it is 4 and 5). The datasheet includes a foot note 3 to Table 12 that makes this complex to support. "(3) To remove AUX5 or AUX5 and AUX3 from the alert detection, conversions on three auxiliary ADC input channels only must be selected in the control register." This mode has never been supported by the driver. As this support would be complex to add and the rework is being done against a QEMU model developed for the purposes of verifying nothing is broken, it is better to drop this support for now. Reported-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com> Link: https://lore.kernel.org/r/20220206190328.333093-16-jic23@kernel.org
Diffstat (limited to 'drivers/staging/iio')
-rw-r--r--drivers/staging/iio/adc/ad7280a.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging/iio/adc/ad7280a.c
index e8c9f22971cb..a32c32a1226a 100644
--- a/drivers/staging/iio/adc/ad7280a.c
+++ b/drivers/staging/iio/adc/ad7280a.c
@@ -1022,28 +1022,6 @@ static int ad7280_probe(struct spi_device *spi)
break;
}
}
- if (device_property_present(dev, "adi,temp-alert-last-chan")) {
- u32 val;
-
- ret = device_property_read_u32(dev, "adi,temp-alert-last-chan", &val);
- if (ret)
- return ret;
-
- switch (val) {
- case 3:
- st->chain_last_alert_ignore |= AD7280A_ALERT_REMOVE_AUX3_AUX5;
- break;
- case 4:
- st->chain_last_alert_ignore |= AD7280A_ALERT_REMOVE_AUX5;
- break;
- case 5:
- break;
- default:
- dev_err(dev,
- "Firmware provided last temp alert channel invalid\n");
- break;
- }
- }
crc8_populate_msb(st->crc_tab, POLYNOM);
st->spi->max_speed_hz = AD7280A_MAX_SPI_CLK_HZ;