@@ -882,6 +882,15 @@ Description:
RW
+What: /sys/class/hwmon/hwmonX/powerY_fault
+Description:
+ Reports a power sensor failure.
+
+ - 1: Failed
+ - 0: Ok
+
+ RO
+
What: /sys/class/hwmon/hwmonX/powerY_rated_min
Description:
Minimum rated power.
@@ -560,6 +560,7 @@ static const char * const hwmon_power_attr_templates[] = {
[hwmon_power_crit] = "power%d_crit",
[hwmon_power_label] = "power%d_label",
[hwmon_power_alarm] = "power%d_alarm",
+ [hwmon_power_fault] = "power%d_fault",
[hwmon_power_cap_alarm] = "power%d_cap_alarm",
[hwmon_power_min_alarm] = "power%d_min_alarm",
[hwmon_power_max_alarm] = "power%d_max_alarm",
@@ -237,6 +237,7 @@ enum hwmon_power_attributes {
hwmon_power_max_alarm,
hwmon_power_lcrit_alarm,
hwmon_power_crit_alarm,
+ hwmon_power_fault,
hwmon_power_rated_min,
hwmon_power_rated_max,
};
@@ -270,6 +271,7 @@ enum hwmon_power_attributes {
#define HWMON_P_MAX_ALARM BIT(hwmon_power_max_alarm)
#define HWMON_P_LCRIT_ALARM BIT(hwmon_power_lcrit_alarm)
#define HWMON_P_CRIT_ALARM BIT(hwmon_power_crit_alarm)
+#define HWMON_P_FAULT BIT(hwmon_power_fault)
#define HWMON_P_RATED_MIN BIT(hwmon_power_rated_min)
#define HWMON_P_RATED_MAX BIT(hwmon_power_rated_max)
Power sensor driver might want to signal that the power value is not usable. Add a new power fault attribute to report such failures. Signed-off-by: Armin Wolf <W_Armin@gmx.de> --- Changes since v2: - added patch --- Documentation/ABI/testing/sysfs-class-hwmon | 9 +++++++++ drivers/hwmon/hwmon.c | 1 + include/linux/hwmon.h | 2 ++ 3 files changed, 12 insertions(+) -- 2.39.2