]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Mar 2023 12:33:51 +0000 (13:33 +0100)
commitb910043b96dd3c4bfd50c8a328cb0cf582a63ca2
treec708c20e454436a1da35130b1bda6e283eeb8430
parentee7e74fcd5fb3b482aaa920c6660488a178a81b6
hwmon: (adt7475) Fix masking of hysteresis registers

[ Upstream commit 20d6d4f83b84659632dafe7982bcef330bb50f1c ]

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: 9710f8bd109c ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hwmon/adt7475.c