Skip to content
Commit eace761f authored by Robert Hancock's avatar Robert Hancock Committed by Greg Kroah-Hartman
Browse files

iio: adc: xilinx-xadc: Correct temperature offset/scale for UltraScale



commit e2bd8c28 upstream.

The driver was previously using offset and scale values for the
temperature sensor readings which were only valid for 7-series devices.
Add per-device-type values for offset and scale and set them appropriately
for each device type.

Note that the values used for the UltraScale family are for UltraScale+
(i.e. the SYSMONE4 primitive) using the internal reference, as that seems
to be the most common configuration and the device tree values Xilinx's
device tree generator produces don't seem to give us anything to tell us
which configuration is used. However, the differences within the UltraScale
family seem fairly minor and it's closer than using the 7-series values
instead in any case.

Fixes: c2b7720a ("iio: xilinx-xadc: Add basic support for Ultrascale System Monitor")
Signed-off-by: default avatarRobert Hancock <robert.hancock@calian.com>
Acked-by: default avatarO'Griofa, Conall <conall.ogriofa@amd.com>
Tested-by: default avatarO'Griofa, Conall <conall.ogriofa@amd.com>
Link: https://lore.kernel.org/r/20230915001019.2862964-3-robert.hancock@calian.com


Cc: <Stable@vger.kernel.org>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 70322a44
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment