]> 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:28:07 +0000 (13:28 +0100)
commite6fc2f72c7c7a58a0c59b1226bf84be53f37d3f6
treead5e60f1f1d798fec6b70962e45cd25ecce6a9f5
parent0c2edfa6162e71d01984b9e8ae3795fb22c03c89
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: 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