Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 83274c68 authored by Guenter Roeck's avatar Guenter Roeck
Browse files

hwmon: (pmbus) More stringent checking of VOUT_MODE register



Some PMBus chips do not support the VOUT_MODE register. To make matters worse,
such chips may not return an error when reading the register either, but instead
return 0xff.

Check if the register exists using pmbus_check_byte_register() before reading
its value. In addition, validate the returned value and ignore it if it is 0xff
(which is invalid).

Reported-by: default avatarGreg Schnorr <gschnorr@cisco.com>
Tested-by: default avatarGreg Schnorr <gschnorr@cisco.com>
Signed-off-by: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
Acked-by: default avatarGreg Schnorr <gschnorr@cisco.com>
parent a3eeb453
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment