OSDN Git Service

hwmon: (adt7475) Fix masking of hysteresis registers
authorTony O'Brien <tony.obrien@alliedtelesis.co.nz>
Wed, 22 Feb 2023 00:52:28 +0000 (13:52 +1300)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 5 Mar 2023 23:08:06 +0000 (15:08 -0800)
commit48e8186870d9d0902e712d601ccb7098cb220688
tree783244833c55aaa8224102b70a98b741213a650c
parent5f8d1e3b6f9b5971f9c06d5846ce00c49e3a8d94
hwmon: (adt7475) Fix masking of hysteresis registers

The wrong bits are masked in the hysteresis register; indices 0 and 2
should zero bits [7:4] and preserve bits [3:0], and index 1 should zero
bits [3:0] and preserve bits [7:4].

Fixes: 1c301fc5394f ("hwmon: Add a driver for the ADT7475 hardware monitoring chip")
Signed-off-by: Tony O'Brien <tony.obrien@alliedtelesis.co.nz>
Link: https://lore.kernel.org/r/20230222005228.158661-3-tony.obrien@alliedtelesis.co.nz
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/adt7475.c