summaryrefslogtreecommitdiff
path: root/drivers/iio/adc/ti-adc084s021.c
diff options
context:
space:
mode:
authorRobert Hancock <robert.hancock@calian.com>2023-09-15 03:10:18 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2023-10-13 21:10:25 +0300
commit8d6b3ea4d9eaca80982442b68a292ce50ce0a135 (patch)
tree2b819e1906e48a2b51b3c478b7d53d35f239704c /drivers/iio/adc/ti-adc084s021.c
parent7b695ef6696e248aad02b17ca3ba088db2d59c31 (diff)
downloadlinux-8d6b3ea4d9eaca80982442b68a292ce50ce0a135.tar.xz
iio: adc: xilinx-xadc: Don't clobber preset voltage/temperature thresholds
In the probe function, the driver was reading out the thresholds already set in the core, which can be configured by the user in the Vivado tools when the FPGA image is built. However, it later clobbered those values with zero or maximum values. In particular, the overtemperature shutdown threshold register was overwritten with the max value, which effectively prevents the FPGA from shutting down when the desired threshold was eached, potentially risking hardware damage in that case. Remove this code to leave the preconfigured default threshold values intact. The code was also disabling all alarms regardless of what enable state they were left in by the FPGA image, including the overtemperature shutdown feature. Leave these bits in their original state so they are not unconditionally disabled. Fixes: bdc8cda1d010 ("iio:adc: Add Xilinx XADC driver") Signed-off-by: Robert Hancock <robert.hancock@calian.com> Acked-by: O'Griofa, Conall <conall.ogriofa@amd.com> Tested-by: O'Griofa, Conall <conall.ogriofa@amd.com> Link: https://lore.kernel.org/r/20230915001019.2862964-2-robert.hancock@calian.com Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/adc/ti-adc084s021.c')
0 files changed, 0 insertions, 0 deletions