Commit 119abf7d authored by Guenter Roeck's avatar Guenter Roeck
Browse files

hwmon: (max16065) Fix alarm attributes



Chips reporting overcurrent alarms report it in the second alarm register.
That means the second alarm register has to be read, even if the chip only
supports 8 or fewer ADC channels.

MAX16067 and MAX16068 report undervoltage and overvoltage alarms in
separate registers. Fold register contents together to report both with
the existing alarm attribute. This requires actually storing the chip type
in struct max16065_data. Rename the variable 'chip' to match the variable
name used in the probe function.

Reviewed-by: default avatarTzung-Bi Shih <tzungbi@kernel.org>
Fixes: f5bae264 ("hwmon: Driver for MAX16065 System Manager and compatibles")
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 744ec447
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment