Skip to content

Commit

Permalink
power: supply: hwmon: Fix missing temp1_max_alarm attribute
Browse files Browse the repository at this point in the history
commit e50a57d upstream.

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: f1d33ae ("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]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
jwrdegoede authored and gregkh committed Oct 10, 2024
1 parent 947c045 commit a70641d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/power/supply/power_supply_hwmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down

0 comments on commit a70641d

Please sign in to comment.