• Robert Hancock's avatar
    hwmon: (pmbus/core) Treat parameters as paged if on multiple pages · 4cfd8b68
    Robert Hancock authored
    [ Upstream commit 4a60570d ]
    
    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: b4ce237b ("hwmon: (pmbus) Introduce infrastructure to detect sensors and limit registers")
    Signed-off-by: default avatarRobert Hancock <hancock@sedsystems.ca>
    Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
    Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
    4cfd8b68
pmbus_core.c 59.2 KB