linux/drivers/thermal/spacemit
surendra 68b78ad1e3
thermal/drivers/spacemit: Validate clamped trip thresholds
k1_tsensor_set_trips() checks the requested trip temperatures before
converting them to the sensor register representation. Distinct
out-of-range temperatures can clamp to the same hardware value, leaving the
sensor with an invalid low/high threshold pair.

Validate the ordering after conversion and clamping.

Fixes: 296a977f2b ("thermal/drivers/spacemit/k1: Add thermal sensor support")
Signed-off-by: surendra <kr494167@gmail.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
Link: https://patch.msgid.link/20260720103606.93924-1-kr494167@gmail.com
2026-08-07 17:18:53 +02:00
..
k1_tsensor.c thermal/drivers/spacemit: Validate clamped trip thresholds 2026-08-07 17:18:53 +02:00
Kconfig
Makefile