• Guenter Roeck's avatar
    hwmon: (pmbus/adm1275) Fix power sampling support · 7d45deb3
    Guenter Roeck authored
    Not every chip supported by this driver supports setting the number
    of samples for power averaging. Also, the power monitoring register
    is not always a 16-bit register, and the configuration bits used for
    voltage sampling are different depending on the register width.
    Some conditional code is needed to fix the problem.
    
    On top of all that, the compiler complains about problems with
    FIELD_GET and FIELD_PREP macros if the file is built with W=1.
    Avoid using those macros to silence the warning.
    
    Cc: Krzysztof Adamski <krzysztof.adamski@nokia.com>
    Cc: Alexander Sverdlin <alexander.sverdlin@nokia.com>
    Reviewed-by: default avatarKrzysztof Adamski <krzysztof.adamski@nokia.com>
    Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
    7d45deb3
adm1275.c 21.4 KB