summaryrefslogtreecommitdiffstats
path: root/Documentation/hwmon/max16601.rst
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2020-05-07 19:21:33 +0200
committerGuenter Roeck <linux@roeck-us.net>2020-05-22 15:28:38 +0200
commitd86f3c9bba20426ebb31c3a3d061dd4a8b12c85b (patch)
tree76c0c7024896f76f988752b188689c6dfa44078e /Documentation/hwmon/max16601.rst
parenthwmon: (adt7411) update contact email (diff)
downloadlinux-d86f3c9bba20426ebb31c3a3d061dd4a8b12c85b.tar.xz
linux-d86f3c9bba20426ebb31c3a3d061dd4a8b12c85b.zip
hwmon: (pmbus) Improve initialization of 'currpage' and 'currphase'
The 'currpage' and 'currphase' variables in struct pmbus_data are used by the PMBus core to determine if the phase or page value has changed. Both are initialized with values which are never expected to be set in the code to ensure that the first page/phase write operation is actually performed. This is not well explained and occasionally causes confusion. Change the type of both variables to s16 and initialize with -1 to ensure that the initial value never matches a requested value, and clarify that this value means "unknown/unset". Cc: Alex Qiu <xqiu@google.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'Documentation/hwmon/max16601.rst')
0 files changed, 0 insertions, 0 deletions