Re: [PATCH v2] hwmon: (lm80) Add support for Texas Instruments AMC80

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add support for AMC80 which is register compatible with LM96080

PS -let me know if you'd like me to update other broken links in docs.

Signed-off-by: Andrei Aldea <andrei1998@xxxxxxxxx>
---
 Documentation/hwmon/lm80.rst | 20 +++++++++++++++-----
 drivers/hwmon/Kconfig        |  4 ++--
 drivers/hwmon/lm80.c         |  6 ++++++
 3 files changed, 23 insertions(+), 7 deletions(-)

diff --git a/Documentation/hwmon/lm80.rst b/Documentation/hwmon/lm80.rst
index c53186abd82e..bb223b408e15 100644
--- a/Documentation/hwmon/lm80.rst
+++ b/Documentation/hwmon/lm80.rst
@@ -9,9 +9,9 @@ Supported chips:
 
     Addresses scanned: I2C 0x28 - 0x2f
 
-    Datasheet: Publicly available at the National Semiconductor website
+    Datasheet: Publicly available at the Texas Instruments website
 
-	       http://www.national.com/
+	       http://www.ti.com/product/LM80
 
   * National Semiconductor LM96080
 
@@ -19,10 +19,19 @@ Supported chips:
 
     Addresses scanned: I2C 0x28 - 0x2f
 
-    Datasheet: Publicly available at the National Semiconductor website
+    Datasheet: Publicly available at the Texas Instruments website
 
-	       http://www.national.com/
+	       http://www.ti.com/product/LM96080
 
+  * Texas Instruments AMC80
+
+    Prefix: "amc80"
+
+    Addresses scanned: I2C 0x28 - 0x2f
+
+    Datasheet: Publicly available at the Texas Instruments website
+
+        http://www.ti.com/product/AMC80
 
 Authors:
        - Frodo Looijaard <frodol@xxxxxx>,
@@ -35,7 +44,8 @@ This driver implements support for the National Semiconductor LM80.
 It is described as a 'Serial Interface ACPI-Compatible Microprocessor
 System Hardware Monitor'. The LM96080 is a more recent incarnation,
 it is pin and register compatible, with a few additional features not
-yet supported by the driver.
+yet supported by the driver. The AMC80 is pin and register compatible
+with the LM96080 and only changes the manufacturer ID.
 
 The LM80 implements one temperature sensor, two fan rotation speed sensors,
 seven voltage sensors, alarms, and some miscellaneous stuff.
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 83945397b6eb..7a2a7e854c8c 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -1446,11 +1446,11 @@ config SENSORS_LM78
 	  will be called lm78.
 
 config SENSORS_LM80
-	tristate "National Semiconductor LM80 and LM96080"
+	tristate "National Semiconductor LM80 and compatibles"
 	depends on I2C
 	help
 	  If you say yes here you get support for National Semiconductor
-	  LM80 and LM96080 sensor chips.
+	  LM80, LM96080 and Texas Instruments AMC80 sensor chips.
 
 	  This driver can also be built as a module. If so, the module
 	  will be called lm80.
diff --git a/drivers/hwmon/lm80.c b/drivers/hwmon/lm80.c
index 63c7831bd3e1..0355b9d849be 100644
--- a/drivers/hwmon/lm80.c
+++ b/drivers/hwmon/lm80.c
@@ -573,6 +573,11 @@ static int lm80_detect(struct i2c_client *client, struct i2c_board_info *info)
 			return -ENODEV;
 
 		name = "lm96080";
+
+	/* Check for  AMC80 version which is register compatible with lm96080 */
+	} else if (man_id == 0x80 && dev_id == 0x08) {
+		name = "amc80";
+
 	} else {
 		/* Check 6-bit addressing */
 		for (i = 0x2a; i <= 0x3d; i++) {
@@ -624,6 +629,7 @@ static int lm80_probe(struct i2c_client *client)
 static const struct i2c_device_id lm80_id[] = {
 	{ "lm80", 0 },
 	{ "lm96080", 1 },
+	{ "amc80", 2},
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, lm80_id);
-- 
2.39.3 (Apple Git-146)





[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux