hwmon: (lm90) Add partial PEC support for ADT7461
authorGuenter Roeck <linux@roeck-us.net>
Tue, 9 Nov 2021 01:45:05 +0000 (17:45 -0800)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 13 Jul 2022 15:38:17 +0000 (08:38 -0700)
Revision 0 of the ADT7461 datasheet suggests that the chip supports PEC
(packet error checking). This information is gone in later versions of the
datasheet. Experiments show that PEC support on ADT7461 is similar to PEC
support in ADM1032, ie it is only supported for read operations. Add
support for it to the driver.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Documentation/hwmon/lm90.rst
drivers/hwmon/lm90.c

index f107d4a159fa16fe2d95915bd51622099e5c4509..9886a298797f42f59021bc2ce6d9769c35e9a4ef 100644 (file)
@@ -322,6 +322,7 @@ ADM1032:
 ADT7461, ADT7461A, NCT1008:
   * Extended temperature range (breaks compatibility)
   * Lower resolution for remote temperature
+  * SMBus PEC support for Write Byte and Receive Byte transactions.
 
 MAX6654:
   * Better local resolution
index 8ba95ea06f0c146d2998598db2cd0561c524c00f..6c79422da4201b8da5b8b8aba38e6f94739f79b4 100644 (file)
@@ -356,7 +356,7 @@ static const struct lm90_params lm90_params[] = {
        [adt7461] = {
                .flags = LM90_HAVE_OFFSET | LM90_HAVE_REM_LIMIT_EXT
                  | LM90_HAVE_BROKEN_ALERT | LM90_HAVE_EXTENDED_TEMP
-                 | LM90_HAVE_CRIT,
+                 | LM90_HAVE_CRIT | LM90_HAVE_PARTIAL_PEC,
                .alert_alarms = 0x7c,
                .max_convrate = 10,
        },