]> Git Repo - linux.git/commitdiff
power: supply: hwmon: Fix missing temp1_max_alarm attribute
authorHans de Goede <[email protected]>
Sun, 8 Sep 2024 18:53:37 +0000 (20:53 +0200)
committerSebastian Reichel <[email protected]>
Sat, 14 Sep 2024 09:06:07 +0000 (11:06 +0200)
Temp channel 0 aka temp1 can have a temp1_max_alarm attribute for
power_supply devices which have a POWER_SUPPLY_PROP_TEMP_ALERT_MAX
property.

HWMON_T_MAX_ALARM was missing from power_supply_hwmon_info for
temp channel 0, causing the hwmon temp1_max_alarm attribute to be
missing from such power_supply devices.

Add this to power_supply_hwmon_info to fix this.

Fixes: f1d33ae806ec ("power: supply: remove duplicated argument in power_supply_hwmon_info")
Cc: [email protected]
Signed-off-by: Hans de Goede <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sebastian Reichel <[email protected]>
drivers/power/supply/power_supply_hwmon.c

index baacefbdf768abea1c5d03ee5b097d72d73f6c4d..6fbbfb1c685e6c7fde41ea2fa88a557ed6dda2a1 100644 (file)
@@ -318,7 +318,8 @@ static const struct hwmon_channel_info * const power_supply_hwmon_info[] = {
                           HWMON_T_INPUT     |
                           HWMON_T_MAX       |
                           HWMON_T_MIN       |
-                          HWMON_T_MIN_ALARM,
+                          HWMON_T_MIN_ALARM |
+                          HWMON_T_MAX_ALARM,
 
                           HWMON_T_LABEL     |
                           HWMON_T_INPUT     |
This page took 0.057807 seconds and 4 git commands to generate.