hwmon: (pmbus) Implement multi-phase support
authorGuenter Roeck <linux@roeck-us.net>
Mon, 13 Jan 2020 23:30:14 +0000 (15:30 -0800)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 9 Mar 2020 03:35:47 +0000 (20:35 -0700)
commit16358542f32f47f372ad48e4cdf61ab245c9f49d
tree3da8a97cf0425631b0231dfe24d3694ceb554179
parent43f33b6e59c229ca82df4f56154d50fbea3ecc80
hwmon: (pmbus) Implement multi-phase support

Some PMBus chips support multiple phases, and report telemetry such
as input current, output current, or temperature for each phase.
Add support for such chips to the PMBus core.

Start with a maximum of 8 phases per page, and assume that supported
sensors per phase are similar for all pages. Only support per-phase
telemetry attributes, no limits or alarms.

As part of this patch, set the initial page variable to 0xff to ensure
that the page is updated when the first page command is issued. Also
only issue page commands if the chip supports more than one page.

Cc: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Documentation/hwmon/pmbus.rst
drivers/hwmon/pmbus/pmbus.h
drivers/hwmon/pmbus/pmbus_core.c