kernel_samsung_a53x/drivers
Robert Hancock 956adc7db7 iio: adc: xilinx-xadc: Don't clobber preset voltage/temperature thresholds
[ Upstream commit 8d6b3ea4d9eaca80982442b68a292ce50ce0a135 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 10:58:32 +01:00
..
accessibility Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
acpi ACPI: irq: Fix incorrect return value in acpi_register_gsi() 2024-11-08 11:26:19 +01:00
amba Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
android binder_alloc: Disable debug logging by default 2024-11-17 17:43:54 +01:00
ata ata: libata-eh: Fix compilation warning in ata_eh_link_report() 2024-11-08 11:26:16 +01:00
atm Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
auxdisplay Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
base arch_topology: Rename freq_scale as arch_freq_scale 2024-11-17 17:45:22 +01:00
battery drivers: battery_v2: sec_battery: export {CURRENT/VOLTAGE}_MAX to sysfs 2024-11-17 17:43:14 +01:00
bcma Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
block zram: use copy_page for full page copy 2024-11-17 17:41:38 +01:00
bluetooth Bluetooth: vhci: Fix race when opening vhci device 2024-11-08 11:26:08 +01:00
bts Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bus Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cdrom Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
char Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clk clk: Sanitize possible_parent_show to Handle Return Value of of_clk_get_parent_name 2024-11-18 10:58:31 +01:00
clocksource Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
connector Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
counter counter: microchip-tcb-capture: Fix the use of internal GCLK logic 2024-11-08 11:25:51 +01:00
cpufreq s5e8825: Tuning 2024-10-17 12:50:20 -03:00
cpuidle Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
crypto drivers: fmp: remove failing command 2024-06-15 16:28:48 -03:00
dax Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dca Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
devfreq exynos_pm_qos: Remove exynos_pm_qos_update_request_timeout() 2024-11-17 17:44:09 +01:00
dio Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dma dma: pl330: Make IRQ handler non-threaded on RT 2024-11-17 17:44:35 +01:00
dma-buf Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
edac Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
eisa Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
extcon Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fingerprint Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
firewire Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
firmware Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fpga Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fsi Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gnss Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gpio gpio: vf610: set value before the direction to avoid a glitch 2024-11-08 11:26:20 +01:00
gpu drm/dp_mst: Fix NULL deref in get_mst_branch_device_by_guid_helper() 2024-11-18 10:58:29 +01:00
greybus Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gud Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid HID: multitouch: Add required quirk for Synaptics 0xcd7e device 2024-11-08 11:26:17 +01:00
hsi Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hv Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hwmon Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hwspinlock Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hwtracing Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c i2c: aspeed: Fix i2c bus hang in slave read 2024-11-18 10:58:31 +01:00
i3c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ide Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
idle Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ifconn Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iio iio: adc: xilinx-xadc: Don't clobber preset voltage/temperature thresholds 2024-11-18 10:58:32 +01:00
infiniband RDMA/srp: Fix srp_abort() 2024-11-08 11:26:06 +01:00
input Input: goodix - ensure int GPIO is in input for gpio_count == 1 && gpio_int_idx == 0 case 2024-11-08 11:25:50 +01:00
interconnect Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iommu iommu/samsung: Disable fault reporting by default 2024-11-17 17:44:13 +01:00
ipack Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irqchip Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
isdn Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kperfmon Kperfmon: add xyunbound version 2024-06-15 16:28:49 -03:00
kq/mesh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
leds Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lightnvm Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
macintosh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mailbox Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mcb mcb-lpc: Reallocate memory region to avoid memory overlapping 2024-11-18 10:58:28 +01:00
md Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
media mfc: Reduce QoS boosting from Samsung hacks 2024-11-17 17:43:58 +01:00
memory Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
memstick Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
message Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mfd Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
misc misc: fastrpc: Clean buffers on remote invocation failures 2024-11-18 10:58:31 +01:00
mmc mmc: renesas_sdhi: use custom mask for TMIO_MASK_ALL 2024-11-18 10:58:28 +01:00
most Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtd mtd: physmap-core: Restore map_rom fallback 2024-11-08 11:26:18 +01:00
muic Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mux Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
net i40e: Fix wrong check for I40E_TXR_FLAGS_WB_ON_ITR 2024-11-18 10:58:30 +01:00
nfc drivers/nfc_logger: Fix implicit int 2024-06-15 16:28:48 -03:00
ntb Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nubus Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nvdimm Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nvme nvme-rdma: do not try to stop unallocated queues 2024-11-08 11:26:19 +01:00
nvmem nvmem: imx: correct nregs for i.MX6UL 2024-11-18 10:58:31 +01:00
of Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
opp Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
oprofile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
parisc Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
parport Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcmcia Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
perf perf/arm-cmn: Fix the unhandled overflow status of counter 4 to 7 2024-11-08 11:24:52 +01:00
phy phy: mapphone-mdm6600: Fix pinctrl_pm handling for sleep pins 2024-11-08 11:26:20 +01:00
pinctrl Revert "pinctrl: avoid unsafe code pattern in find_pinctrl()" 2024-11-08 11:26:19 +01:00
platform platform/x86: asus-wmi: Map 0x2a code, Ignore 0x2b and 0x2c events 2024-11-08 11:26:20 +01:00
pnp Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
power Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
powercap Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pps Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ps3 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ptp Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pwm Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rapidio Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ras Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
regulator regulator/core: Revert "fix kobject release warning and memory leak in regulator_register()" 2024-11-08 11:26:17 +01:00
remoteproc Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
reset Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rpmsg Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rtc Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s390 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
samsung Fix clang 16 errors treewide 2024-06-15 16:28:48 -03:00
sbus Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi Revert "scsi: ufs: Implement IRQ-affined PM QoS for reduced latency" 2024-11-17 19:39:42 +01:00
sensorhub treewide: fix build errors 2024-06-15 16:21:17 -03:00
sensors Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sfi Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
siox Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
slimbus Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
soc drivers: soc: cal-if: Prevent optimization of structs on fvmap_copy_from_sram 2024-11-17 23:41:29 +01:00
soundwire Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spi Revert "spi: spi-zynqmp-gqspi: Fix runtime PM imbalance in zynqmp_qspi_probe" 2024-11-08 11:25:47 +01:00
spmi Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spu_verify Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ssb Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
staging Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
sti Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
target Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tc Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tee tee: amdtee: fix use-after-free vulnerability in amdtee_close_session 2024-11-08 11:25:50 +01:00
thermal s5e8825: Tuning 2024-10-17 12:50:20 -03:00
thunderbolt thunderbolt: Workaround an IOMMU fault on certain systems with Intel Maple Ridge 2024-11-08 11:26:11 +01:00
tty drivers: tty: fix build without SEC_MM 2024-11-17 17:37:39 +01:00
uh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uio Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
usb usb: correct function name 2024-11-17 17:43:41 +01:00
vdpa Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vfio Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vhost Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vibrator Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
video Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
virt Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
virtio virtio-mmio: fix memory leak of vm_dev 2024-11-18 10:58:28 +01:00
vision Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vision3 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
visorbus Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vlynq Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vme Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
w1 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
watchdog Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xen Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zorro Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig drivers: add stub kperfmon 2024-06-15 16:28:49 -03:00
Kconfig.variant1 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile drivers: add stub kperfmon 2024-06-15 16:28:49 -03:00
Makefile.variant1 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00