]> git.itanic.dy.fi Git - linux-stable/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:27:10 +0000 (13:27 +0100)
commit55d01536a2945b44ecb9128edf2e0bdbc4c913dd
tree4b78e6a7cae5de5927a4f8b92e6204d9be9da399
parentad2ae163934b50c58f9141066753e69ef181d234
hwmon: (adt7475) Fix masking of hysteresis registers

[ Upstream commit 48e8186870d9d0902e712d601ccb7098cb220688 ]

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