diff options
Diffstat (limited to 'drivers/hwmon/lm90.c')
-rw-r--r-- | drivers/hwmon/lm90.c | 19 |
1 files changed, 18 insertions, 1 deletions
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 */ |