hwmon: (lm90) Drop critical attribute support for MAX6654
authorGuenter Roeck <linux@roeck-us.net>
Sat, 13 Nov 2021 16:55:06 +0000 (08:55 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Dec 2021 11:25:59 +0000 (12:25 +0100)
commit51c7b2a7b86a923cc410882f3b8bde09ba412f3c
treeaee14bebef31ae1c67405b533b149155cb5f6fda
parent2464738d0ee4ec57bd6f561acc3b178c79703c38
hwmon: (lm90) Drop critical attribute support for MAX6654

[ Upstream commit 16ba51b5dcd3f6dde2e51d5ccc86313119dcf889 ]

Tests with a real chip and a closer look into the datasheet show that
MAX6654 does not support CRIT/THERM/OVERTEMP limits, so drop support
of the respective attributes for this chip.

Introduce LM90_HAVE_CRIT flag and use it to instantiate critical limit
attributes to solve the problem.

Cc: Josh Lehan <krellan@google.com>
Fixes: 229d495d8189 ("hwmon: (lm90) Add max6654 support to lm90 driver")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hwmon/lm90.c