Skip to contentSkip to conversation

hwmon: (lm90) Add support for G781

PATCH In review Guenter Roeck 3 participants 5 messages Jan 23, 2012

Subsystems (3)
lore
Share & tools
lore

Guenter Roeck

author maintainer
#0 lore raw

PATCH v2 1/1 hwmon: (lm90) Add support for G781

GMT G781 is a ADM1032-compatible temperature sensor chip. Add support to the LM90 driver.

---
v2:
- Drop device ID 0x03, since its existence is not confirmed. Instead, accept device ID 0x01 on both 0x4c and 0x4d.
- Drop referring to G781-1; we don't do that for other chips either, and it is not clear if it is even possible to distinguish G781 from G781-1.
- Add G781 information to Kconfig, lm90 documentation
- Mention G781 support in lm90.c file comments
- Modify formatting to better match file formatting

 Documentation/hwmon/lm90 |    5 +++++
 drivers/hwmon/Kconfig    |    3 ++-
 drivers/hwmon/lm90.c     |   19 ++++++++++++++++++-
 3 files changed, 25 insertions(+), 2 deletions(-)
Documentation/hwmon/lm90 +5 -0
index 9cd14cfe..d8f1e66 100644
@@ -118,6 +118,11 @@ Supported chips:
     Addresses scanned: I2C 0x48 through 0x4F
     Datasheet: Publicly available at NXP website
                http://ics.nxp.com/products/interface/datasheet/sa56004x.pdf
+  * GMT G781
+    Prefix: 'g781'
+    Addresses scanned: I2C 0x4c, 0x4d
+    Datasheet: Publicly available, for example from
+    		http://www.datasheetarchive.com/G781-datasheet.html
 
 Author: Jean Delvare <[email protected]>
 
drivers/hwmon/Kconfig +2 -1
index 0226040..930428c 100644
@@ -647,7 +647,8 @@ config SENSORS_LM90
 	  LM86, LM89 and LM99, Analog Devices ADM1032, ADT7461, and ADT7461A,
 	  Maxim MAX6646, MAX6647, MAX6648, MAX6649, MAX6657, MAX6658, MAX6659,
 	  MAX6680, MAX6681, MAX6692, MAX6695, MAX6696, ON Semiconductor NCT1008,
-	  Winbond/Nuvoton W83L771W/G/AWG/ASG and Philips SA56004 sensor chips.
+	  Winbond/Nuvoton W83L771W/G/AWG/ASG, Philips SA56004, and GMT G781
+	  sensor chips.
 
 	  This driver can also be built as a module.  If so, the module
 	  will be called lm90.
drivers/hwmon/lm90.c +18 -1
index 2e207de..0af8f8f 100644
@@ -57,6 +57,9 @@
  * This driver also supports the SA56004 from Philips. This device is
  * pin-compatible with the LM86, the ED/EDP parts are also address-compatible.
  *
+ * This driver also supports the G781 from GMT. This device is compatible
+ * with the ADM1032.
+ *
  * Since the LM90 was the first chipset supported by this driver, most
  * comments will refer to this chipset, but are actually general and
  * concern all supported chipsets, unless mentioned otherwise.
@@ -107,7 +110,7 @@ static const unsigned short normal_i2c[] = {
 	0x4d, 0x4e, 0x4f, I2C_CLIENT_END };
 
 enum chips { lm90, adm1032, lm99, lm86, max6657, max6659, adt7461, max6680,
-	max6646, w83l771, max6696, sa56004 };
+	max6646, w83l771, max6696, sa56004, g781 };
 
 /*
  * The LM90 registers
@@ -184,6 +187,7 @@ static const struct i2c_device_id lm90_id[] = {
 	{ "adm1032", adm1032 },
 	{ "adt7461", adt7461 },
 	{ "adt7461a", adt7461 },
+	{ "g781", g781 },
 	{ "lm90", lm90 },
 	{ "lm86", lm86 },
 	{ "lm89", lm86 },
@@ -229,6 +233,12 @@ static const struct lm90_params lm90_params[] = {
 		.alert_alarms = 0x7c,
 		.max_convrate = 10,
 	},
+	[g781] = {
+		.flags = LM90_HAVE_OFFSET | LM90_HAVE_REM_LIMIT_EXT
+		  | LM90_HAVE_BROKEN_ALERT,
+		.alert_alarms = 0x7c,
+		.max_convrate = 8,
+	},
 	[lm86] = {
 		.flags = LM90_HAVE_OFFSET | LM90_HAVE_REM_LIMIT_EXT,
 		.alert_alarms = 0x7b,
@@ -1291,6 +1301,13 @@ static int lm90_detect(struct i2c_client *client,
 		 && convrate <= 0x09) {
 			name = "sa56004";
 		}
+	} else
+	if ((address = 0x4C || address = 0x4D)
+	 && man_id = 0x47) { /* GMT */
+		if (chip_id = 0x01 /* G781 */
+		 && (config1 & 0x3F) = 0x00
+		 && convrate <= 0x08)
+			name = "g781";
 	}
 
 	if (!name) { /* identification failed */
Signature · 7 lines
1.7.5.4


_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Acked-by on v2 1/1
#1 lore raw

Hi Guenter,

Quoted 25 lines · Guenter Roeck

GMT G781 is a ADM1032-compatible temperature sensor chip. Add support to the LM90 driver.

---
v2:
- Drop device ID 0x03, since its existence is not confirmed. Instead, accept device ID 0x01 on both 0x4c and 0x4d.
- Drop referring to G781-1; we don't do that for other chips either, and it is not clear if it is even possible to distinguish G781 from G781-1.
- Add G781 information to Kconfig, lm90 documentation
- Mention G781 support in lm90.c file comments
- Modify formatting to better match file formatting

 Documentation/hwmon/lm90 |    5 +++++
 drivers/hwmon/Kconfig    |    3 ++-
 drivers/hwmon/lm90.c     |   19 ++++++++++++++++++-
 3 files changed, 25 insertions(+), 2 deletions(-)
Documentation/hwmon/lm90 +0 -0
index 9cd14cfe..d8f1e66 100644

Documentation/hwmon/lm90 Supported chips: · line 125

Quoted 8 lines
Documentation/hwmon/lm90 +5 -0
@@ -118,6 +118,11 @@ Supported chips:
     Addresses scanned: I2C 0x48 through 0x4F
     Datasheet: Publicly available at NXP website
                http://ics.nxp.com/products/interface/datasheet/sa56004x.pdf
+  * GMT G781
+    Prefix: 'g781'
+    Addresses scanned: I2C 0x4c, 0x4d
+    Datasheet: Publicly available, for example from
+    		http://www.datasheetarchive.com/G781-datasheet.html

Not sure if we really want to document the availability from a 3rd party site. There may be legal concerns. If the datasheet isn't publicly available for download from the vendor, it might have been obtained under NDA in the first place.

It probably doesn't add much value anyway... I guess it was found by googling, the reader can do the same.

All the rest looks good, so:

Let me know if you want me to pick this in my tree as the maintainer of the lm90 driver.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#2 lore raw
In reply to Guenter Roeck
Quoted 42 lines · Jean Delvare

Hi Guenter,

Quoted 25 lines · Guenter Roeck

GMT G781 is a ADM1032-compatible temperature sensor chip. Add support to the LM90 driver.

---
v2:
- Drop device ID 0x03, since its existence is not confirmed. Instead, accept device ID 0x01 on both 0x4c and 0x4d.
- Drop referring to G781-1; we don't do that for other chips either, and it is not clear if it is even possible to distinguish G781 from G781-1.
- Add G781 information to Kconfig, lm90 documentation
- Mention G781 support in lm90.c file comments
- Modify formatting to better match file formatting

 Documentation/hwmon/lm90 |    5 +++++
 drivers/hwmon/Kconfig    |    3 ++-
 drivers/hwmon/lm90.c     |   19 ++++++++++++++++++-
 3 files changed, 25 insertions(+), 2 deletions(-)
Documentation/hwmon/lm90 +0 -0
index 9cd14cfe..d8f1e66 100644

Documentation/hwmon/lm90 Supported chips: · line 125

Quoted 8 lines
Documentation/hwmon/lm90 +5 -0
@@ -118,6 +118,11 @@ Supported chips:
     Addresses scanned: I2C 0x48 through 0x4F
     Datasheet: Publicly available at NXP website
                http://ics.nxp.com/products/interface/datasheet/sa56004x.pdf
+  * GMT G781
+    Prefix: 'g781'
+    Addresses scanned: I2C 0x4c, 0x4d
+    Datasheet: Publicly available, for example from
+    		http://www.datasheetarchive.com/G781-datasheet.html

Not sure if we really want to document the availability from a 3rd party site. There may be legal concerns. If the datasheet isn't publicly available for download from the vendor, it might have been obtained under NDA in the first place.

Quoted 3 lines

It probably doesn't add much value anyway... I guess it was found by googling, the reader can do the same.

I agree; lets drop it. Wasn't sure about that myself. Want me to resubmit ?

Quoted 7 lines

All the rest looks good, so:

Let me know if you want me to pick this in my tree as the maintainer of the lm90 driver.

Your call; I also have the multi-line comment patch pending for it. I would suggest either you take both patches, or I do. I am fine either way.

Thanks,
Guenter

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#3 lore raw
In reply to Guenter Roeck
Quoted 43 lines · Guenter Roeck
Quoted 42 lines · Jean Delvare

Hi Guenter,

Quoted 25 lines · Guenter Roeck

GMT G781 is a ADM1032-compatible temperature sensor chip. Add support to the LM90 driver.

---
v2:
- Drop device ID 0x03, since its existence is not confirmed. Instead, accept device ID 0x01 on both 0x4c and 0x4d.
- Drop referring to G781-1; we don't do that for other chips either, and it is not clear if it is even possible to distinguish G781 from G781-1.
- Add G781 information to Kconfig, lm90 documentation
- Mention G781 support in lm90.c file comments
- Modify formatting to better match file formatting

 Documentation/hwmon/lm90 |    5 +++++
 drivers/hwmon/Kconfig    |    3 ++-
 drivers/hwmon/lm90.c     |   19 ++++++++++++++++++-
 3 files changed, 25 insertions(+), 2 deletions(-)
Documentation/hwmon/lm90 +0 -0
index 9cd14cfe..d8f1e66 100644

Documentation/hwmon/lm90 Supported chips: · line 125

Quoted 8 lines
Documentation/hwmon/lm90 +5 -0
@@ -118,6 +118,11 @@ Supported chips:
     Addresses scanned: I2C 0x48 through 0x4F
     Datasheet: Publicly available at NXP website
                http://ics.nxp.com/products/interface/datasheet/sa56004x.pdf
+  * GMT G781
+    Prefix: 'g781'
+    Addresses scanned: I2C 0x4c, 0x4d
+    Datasheet: Publicly available, for example from
+    		http://www.datasheetarchive.com/G781-datasheet.html

Not sure if we really want to document the availability from a 3rd party site. There may be legal concerns. If the datasheet isn't publicly available for download from the vendor, it might have been obtained under NDA in the first place.

Quoted 5 lines
Quoted 3 lines

It probably doesn't add much value anyway... I guess it was found by googling, the reader can do the same.

I agree; lets drop it. Wasn't sure about that myself. Want me to resubmit ?

No need to resubmit.

Quoted 10 lines
Quoted 7 lines

All the rest looks good, so:

Let me know if you want me to pick this in my tree as the maintainer of the lm90 driver.

Your call; I also have the multi-line comment patch pending for it. I would suggest either you take both patches, or I do. I am fine either way.

I'll take them both. Easier that way, if more lm90 patches come I'll be the one to review them anyway.

Mike, please test this new patch and confirm it works OK for you.

Thanks,

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#4 lore raw
In reply to Guenter Roeck
Quoted 59 lines · Jean Delvare
Quoted 43 lines · Guenter Roeck
Quoted 42 lines · Jean Delvare

Hi Guenter,

Quoted 25 lines · Guenter Roeck

GMT G781 is a ADM1032-compatible temperature sensor chip. Add support to the LM90 driver.

---
v2:
- Drop device ID 0x03, since its existence is not confirmed. Instead, accept device ID 0x01 on both 0x4c and 0x4d.
- Drop referring to G781-1; we don't do that for other chips either, and it is not clear if it is even possible to distinguish G781 from G781-1.
- Add G781 information to Kconfig, lm90 documentation
- Mention G781 support in lm90.c file comments
- Modify formatting to better match file formatting

 Documentation/hwmon/lm90 |    5 +++++
 drivers/hwmon/Kconfig    |    3 ++-
 drivers/hwmon/lm90.c     |   19 ++++++++++++++++++-
 3 files changed, 25 insertions(+), 2 deletions(-)
Documentation/hwmon/lm90 +0 -0
index 9cd14cfe..d8f1e66 100644

Documentation/hwmon/lm90 Supported chips: · line 125

Quoted 8 lines
Documentation/hwmon/lm90 +5 -0
@@ -118,6 +118,11 @@ Supported chips:
     Addresses scanned: I2C 0x48 through 0x4F
     Datasheet: Publicly available at NXP website
                http://ics.nxp.com/products/interface/datasheet/sa56004x.pdf
+  * GMT G781
+    Prefix: 'g781'
+    Addresses scanned: I2C 0x4c, 0x4d
+    Datasheet: Publicly available, for example from
+    		http://www.datasheetarchive.com/G781-datasheet.html

Not sure if we really want to document the availability from a 3rd party site. There may be legal concerns. If the datasheet isn't publicly available for download from the vendor, it might have been obtained under NDA in the first place.

Quoted 5 lines
Quoted 3 lines

It probably doesn't add much value anyway... I guess it was found by googling, the reader can do the same.

I agree; lets drop it. Wasn't sure about that myself. Want me to resubmit ?

No need to resubmit.

Quoted 7 lines
Quoted 7 lines

All the rest looks good, so:

Let me know if you want me to pick this in my tree as the maintainer of the lm90 driver.

Quoted 7 lines
Quoted 3 lines

Your call; I also have the multi-line comment patch pending for it. I would suggest either you take both patches, or I do. I am fine either way.

I'll take them both. Easier that way, if more lm90 patches come I'll be the one to review them anyway.

Ok, deal.

Thanks,
Guenter

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors