summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/pmbus/pmbus.h
diff options
context:
space:
mode:
authorBrandon Wyman <bjwyman@gmail.com>2022-03-18 00:21:23 +0100
committerGuenter Roeck <linux@roeck-us.net>2022-03-18 06:30:28 +0100
commita5436af598779219b375c1977555c82def1c35d0 (patch)
tree0e4cbc87b83a42e64421b4c330ddc12a0f997680 /drivers/hwmon/pmbus/pmbus.h
parenthwmon: (scpi-hwmon): Use of_device_get_match_data() (diff)
downloadlinux-a5436af598779219b375c1977555c82def1c35d0.tar.xz
linux-a5436af598779219b375c1977555c82def1c35d0.zip
hwmon: (pmbus) Add Vin unit off handling
If there is an input undervoltage fault, reported in STATUS_INPUT command response, there is quite likely a "Unit Off For Insufficient Input Voltage" condition as well. Add a constant for bit 3 of STATUS_INPUT. Update the Vin limit attributes to include both bits in the mask for clearing faults. If an input undervoltage fault occurs, causing a unit off for insufficient input voltage, but the unit is off bit is not cleared, the STATUS_WORD will not be updated to clear the input fault condition. Including the unit is off bit (bit 3) allows for the input fault condition to completely clear. Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Link: https://lore.kernel.org/r/20220317232123.2103592-1-bjwyman@gmail.com Fixes: b4ce237b7f7d3 ("hwmon: (pmbus) Introduce infrastructure to detect sensors and limit registers") [groeck: Dropped unnecessary ()] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/pmbus/pmbus.h')
-rw-r--r--drivers/hwmon/pmbus/pmbus.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hwmon/pmbus/pmbus.h b/drivers/hwmon/pmbus/pmbus.h
index 38f049d68d32..e74b6ef070f3 100644
--- a/drivers/hwmon/pmbus/pmbus.h
+++ b/drivers/hwmon/pmbus/pmbus.h
@@ -319,6 +319,7 @@ enum pmbus_fan_mode { percent = 0, rpm };
/*
* STATUS_VOUT, STATUS_INPUT
*/
+#define PB_VOLTAGE_VIN_OFF BIT(3)
#define PB_VOLTAGE_UV_FAULT BIT(4)
#define PB_VOLTAGE_UV_WARNING BIT(5)
#define PB_VOLTAGE_OV_WARNING BIT(6)