Commit 79536059 authored by Maud Spierings's avatar Maud Spierings Committed by Guenter Roeck
Browse files

hwmon: (ntc_thermistor) return error instead of clipping on OOB



When the ntc is reading Out Of Bounds instead of clipping to the nearest
limit (min/max) return -ENODATA. This prevents malfunctioning sensors
from sending a device into a shutdown loop due to a critical trip.

This implementation will only work for ntc type thermistors if a ptc
type is to be implemented the min/max ohm calculation must be adjusted
to take that into account.

Signed-off-by: default avatarMaud Spierings <maudspierings@gocontroll.com>
Link: https://lore.kernel.org/r/20250307-ntc_oob-v2-1-bba2d32b1a8e@gocontroll.com


Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent ee65d9e6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment