]> git.ipfire.org Git - thirdparty/linux.git/commit
hwmon: (pmbus/core) Treat parameters as paged if on multiple pages
authorRobert Hancock <hancock@sedsystems.ca>
Wed, 5 Jun 2019 19:49:00 +0000 (13:49 -0600)
committerGuenter Roeck <linux@roeck-us.net>
Thu, 6 Jun 2019 01:36:27 +0000 (18:36 -0700)
commit4a60570dce658e3f8885bbcf852430b99f65aca5
treede343130d5efe0fa2201eb2b61b88657d3777f27
parent38463721ec3c39acdabed3a89016ce6bb32a7543
hwmon: (pmbus/core) Treat parameters as paged if on multiple pages

Some chips have attributes which exist on more than one page but the
attribute is not presently marked as paged. This causes the attributes
to be generated with the same label, which makes it impossible for
userspace to tell them apart.

Marking all such attributes as paged would result in the page suffix
being added regardless of whether they were present on more than one
page or not, which might break existing setups. Therefore, we add a
second check which treats the attribute as paged, even if not marked as
such, if it is present on multiple pages.

Fixes: b4ce237b7f7d ("hwmon: (pmbus) Introduce infrastructure to detect sensors and limit registers")
Signed-off-by: Robert Hancock <hancock@sedsystems.ca>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pmbus/pmbus_core.c