]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
hwmon: (pmbus) Add Vin unit off handling
authorBrandon Wyman <bjwyman@gmail.com>
Thu, 17 Mar 2022 23:21:23 +0000 (23:21 +0000)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 20 May 2022 13:18:36 +0000 (15:18 +0200)
commit6afbeaeb610cf7feee9219b2dfe01fdfe90c91e9
treefa5ff4d1f3f91e739765e340f84842f70aa535b2
parentf182afec579fc1294090fd517b4a5a27e421c75b
hwmon: (pmbus) Add Vin unit off handling

BugLink: https://bugs.launchpad.net/bugs/1971497
[ Upstream commit a5436af598779219b375c1977555c82def1c35d0 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/hwmon/pmbus/pmbus.h
drivers/hwmon/pmbus/pmbus_core.c