]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
hwmon: (cros_ec) Add support for temperature thresholds
authorThomas Weißschuh <linux@weissschuh.net>
Sun, 18 Jan 2026 09:45:58 +0000 (10:45 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Sat, 7 Feb 2026 17:32:20 +0000 (09:32 -0800)
commitafa7c56ec447315ab38182bb9c185d8ea712c3ad
tree23c009d96ff1614143f7dc7630d6b0dff472120d
parent11c5802d28dd71fffb4df0720eafe840a953dc92
hwmon: (cros_ec) Add support for temperature thresholds

Implement reading temperature thresholds through
EC_CMD_THERMAL_GET_THRESHOLD/EC_CMD_THERMAL_SET_THRESHOLD.

Thresholds are mapped as follows between the EC and hwmon:

hwmon_temp_max       - EC_TEMP_THRESH_WARN
hwmon_temp_crit      - EC_TEMP_THRESH_HIGH
hwmon_temp_emergency - EC_TEMP_THRESH_HALT

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20260118-cros_ec-hwmon-pwm-v2-4-77eb1709b031@weissschuh.net
[groeck: Rearrange code to no longer use unreachable() since that causes
 a hiccup with some versions of gcc and objtool]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Documentation/hwmon/cros_ec_hwmon.rst
drivers/hwmon/cros_ec_hwmon.c