diff options
-rw-r--r-- | Documentation/hwmon/lm90 | 4 | ||||
-rw-r--r-- | drivers/hwmon/Kconfig | 3 | ||||
-rw-r--r-- | drivers/hwmon/lm90.c | 19 |
3 files changed, 24 insertions, 2 deletions
diff --git a/Documentation/hwmon/lm90 b/Documentation/hwmon/lm90 index 9cd14cfe6515..b466974e142f 100644 --- a/Documentation/hwmon/lm90 +++ b/Documentation/hwmon/lm90 | |||
@@ -118,6 +118,10 @@ Supported chips: | |||
118 | Addresses scanned: I2C 0x48 through 0x4F | 118 | Addresses scanned: I2C 0x48 through 0x4F |
119 | Datasheet: Publicly available at NXP website | 119 | Datasheet: Publicly available at NXP website |
120 | http://ics.nxp.com/products/interface/datasheet/sa56004x.pdf | 120 | http://ics.nxp.com/products/interface/datasheet/sa56004x.pdf |
121 | * GMT G781 | ||
122 | Prefix: 'g781' | ||
123 | Addresses scanned: I2C 0x4c, 0x4d | ||
124 | Datasheet: Not publicly available from GMT | ||
121 | 125 | ||
122 | Author: Jean Delvare <khali@linux-fr.org> | 126 | Author: Jean Delvare <khali@linux-fr.org> |
123 | 127 | ||
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig index 783a3144ffd7..fc3f4e1cad2c 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig | |||
@@ -648,7 +648,8 @@ config SENSORS_LM90 | |||
648 | LM86, LM89 and LM99, Analog Devices ADM1032, ADT7461, and ADT7461A, | 648 | LM86, LM89 and LM99, Analog Devices ADM1032, ADT7461, and ADT7461A, |
649 | Maxim MAX6646, MAX6647, MAX6648, MAX6649, MAX6657, MAX6658, MAX6659, | 649 | Maxim MAX6646, MAX6647, MAX6648, MAX6649, MAX6657, MAX6658, MAX6659, |
650 | MAX6680, MAX6681, MAX6692, MAX6695, MAX6696, ON Semiconductor NCT1008, | 650 | MAX6680, MAX6681, MAX6692, MAX6695, MAX6696, ON Semiconductor NCT1008, |
651 | Winbond/Nuvoton W83L771W/G/AWG/ASG and Philips SA56004 sensor chips. | 651 | Winbond/Nuvoton W83L771W/G/AWG/ASG, Philips SA56004, and GMT G781 |
652 | sensor chips. | ||
652 | 653 | ||
653 | This driver can also be built as a module. If so, the module | 654 | This driver can also be built as a module. If so, the module |
654 | will be called lm90. | 655 | will be called lm90. |
diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c index 22efae34c2f6..3309a511e8e1 100644 --- a/drivers/hwmon/lm90.c +++ b/drivers/hwmon/lm90.c | |||
@@ -57,6 +57,9 @@ | |||
57 | * This driver also supports the SA56004 from Philips. This device is | 57 | * This driver also supports the SA56004 from Philips. This device is |
58 | * pin-compatible with the LM86, the ED/EDP parts are also address-compatible. | 58 | * pin-compatible with the LM86, the ED/EDP parts are also address-compatible. |
59 | * | 59 | * |
60 | * This driver also supports the G781 from GMT. This device is compatible | ||
61 | * with the ADM1032. | ||
62 | * | ||
60 | * Since the LM90 was the first chipset supported by this driver, most | 63 | * Since the LM90 was the first chipset supported by this driver, most |
61 | * comments will refer to this chipset, but are actually general and | 64 | * comments will refer to this chipset, but are actually general and |
62 | * concern all supported chipsets, unless mentioned otherwise. | 65 | * concern all supported chipsets, unless mentioned otherwise. |
@@ -107,7 +110,7 @@ static const unsigned short normal_i2c[] = { | |||
107 | 0x4d, 0x4e, 0x4f, I2C_CLIENT_END }; | 110 | 0x4d, 0x4e, 0x4f, I2C_CLIENT_END }; |
108 | 111 | ||
109 | enum chips { lm90, adm1032, lm99, lm86, max6657, max6659, adt7461, max6680, | 112 | enum chips { lm90, adm1032, lm99, lm86, max6657, max6659, adt7461, max6680, |
110 | max6646, w83l771, max6696, sa56004 }; | 113 | max6646, w83l771, max6696, sa56004, g781 }; |
111 | 114 | ||
112 | /* | 115 | /* |
113 | * The LM90 registers | 116 | * The LM90 registers |
@@ -184,6 +187,7 @@ static const struct i2c_device_id lm90_id[] = { | |||
184 | { "adm1032", adm1032 }, | 187 | { "adm1032", adm1032 }, |
185 | { "adt7461", adt7461 }, | 188 | { "adt7461", adt7461 }, |
186 | { "adt7461a", adt7461 }, | 189 | { "adt7461a", adt7461 }, |
190 | { "g781", g781 }, | ||
187 | { "lm90", lm90 }, | 191 | { "lm90", lm90 }, |
188 | { "lm86", lm86 }, | 192 | { "lm86", lm86 }, |
189 | { "lm89", lm86 }, | 193 | { "lm89", lm86 }, |
@@ -229,6 +233,12 @@ static const struct lm90_params lm90_params[] = { | |||
229 | .alert_alarms = 0x7c, | 233 | .alert_alarms = 0x7c, |
230 | .max_convrate = 10, | 234 | .max_convrate = 10, |
231 | }, | 235 | }, |
236 | [g781] = { | ||
237 | .flags = LM90_HAVE_OFFSET | LM90_HAVE_REM_LIMIT_EXT | ||
238 | | LM90_HAVE_BROKEN_ALERT, | ||
239 | .alert_alarms = 0x7c, | ||
240 | .max_convrate = 8, | ||
241 | }, | ||
232 | [lm86] = { | 242 | [lm86] = { |
233 | .flags = LM90_HAVE_OFFSET | LM90_HAVE_REM_LIMIT_EXT, | 243 | .flags = LM90_HAVE_OFFSET | LM90_HAVE_REM_LIMIT_EXT, |
234 | .alert_alarms = 0x7b, | 244 | .alert_alarms = 0x7b, |
@@ -1289,6 +1299,13 @@ static int lm90_detect(struct i2c_client *client, | |||
1289 | && convrate <= 0x09) { | 1299 | && convrate <= 0x09) { |
1290 | name = "sa56004"; | 1300 | name = "sa56004"; |
1291 | } | 1301 | } |
1302 | } else | ||
1303 | if ((address == 0x4C || address == 0x4D) | ||
1304 | && man_id == 0x47) { /* GMT */ | ||
1305 | if (chip_id == 0x01 /* G781 */ | ||
1306 | && (config1 & 0x3F) == 0x00 | ||
1307 | && convrate <= 0x08) | ||
1308 | name = "g781"; | ||
1292 | } | 1309 | } |
1293 | 1310 | ||
1294 | if (!name) { /* identification failed */ | 1311 | if (!name) { /* identification failed */ |