aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorGuenter Roeck <guenter.roeck@ericsson.com>2010-10-28 14:31:44 -0400
committerJean Delvare <khali@endymion.delvare>2010-10-28 14:31:44 -0400
commit1179324c411edcefb28a5293f8cc6a5bd9567448 (patch)
tree419a050116f8c195b62191caa8e45523d7d30cfc /drivers/hwmon
parent4667bcb8d8fc081a804a798df70dc91241946e0a (diff)
hwmon: (lm90) Introduce capability flag to indicate broken ALERT functionality
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/lm90.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
index 9df08e1cc518..1913f8a5d733 100644
--- a/drivers/hwmon/lm90.c
+++ b/drivers/hwmon/lm90.c
@@ -162,6 +162,7 @@ enum chips { lm90, adm1032, lm99, lm86, max6657, max6659, adt7461, max6680,
162#define LM90_HAVE_EMERGENCY (1 << 4) /* 3rd upper (emergency) limit */ 162#define LM90_HAVE_EMERGENCY (1 << 4) /* 3rd upper (emergency) limit */
163#define LM90_HAVE_EMERGENCY_ALARM (1 << 5)/* emergency alarm */ 163#define LM90_HAVE_EMERGENCY_ALARM (1 << 5)/* emergency alarm */
164#define LM90_HAVE_TEMP3 (1 << 6) /* 3rd temperature sensor */ 164#define LM90_HAVE_TEMP3 (1 << 6) /* 3rd temperature sensor */
165#define LM90_HAVE_BROKEN_ALERT (1 << 7) /* Broken alert */
165 166
166/* 167/*
167 * Driver data (common to all clients) 168 * Driver data (common to all clients)
@@ -200,11 +201,13 @@ struct lm90_params {
200 201
201static const struct lm90_params lm90_params[] = { 202static const struct lm90_params lm90_params[] = {
202 [adm1032] = { 203 [adm1032] = {
203 .flags = LM90_HAVE_OFFSET | LM90_HAVE_REM_LIMIT_EXT, 204 .flags = LM90_HAVE_OFFSET | LM90_HAVE_REM_LIMIT_EXT
205 | LM90_HAVE_BROKEN_ALERT,
204 .alert_alarms = 0x7c, 206 .alert_alarms = 0x7c,
205 }, 207 },
206 [adt7461] = { 208 [adt7461] = {
207 .flags = LM90_HAVE_OFFSET | LM90_HAVE_REM_LIMIT_EXT, 209 .flags = LM90_HAVE_OFFSET | LM90_HAVE_REM_LIMIT_EXT
210 | LM90_HAVE_BROKEN_ALERT,
208 .alert_alarms = 0x7c, 211 .alert_alarms = 0x7c,
209 }, 212 },
210 [lm86] = { 213 [lm86] = {
@@ -1361,7 +1364,7 @@ static void lm90_alert(struct i2c_client *client, unsigned int flag)
1361 /* Disable ALERT# output, because these chips don't implement 1364 /* Disable ALERT# output, because these chips don't implement
1362 SMBus alert correctly; they should only hold the alert line 1365 SMBus alert correctly; they should only hold the alert line
1363 low briefly. */ 1366 low briefly. */
1364 if ((data->kind == adm1032 || data->kind == adt7461) 1367 if ((data->flags & LM90_HAVE_BROKEN_ALERT)
1365 && (alarms & data->alert_alarms)) { 1368 && (alarms & data->alert_alarms)) {
1366 dev_dbg(&client->dev, "Disabling ALERT#\n"); 1369 dev_dbg(&client->dev, "Disabling ALERT#\n");
1367 lm90_read_reg(client, LM90_REG_R_CONFIG1, &config); 1370 lm90_read_reg(client, LM90_REG_R_CONFIG1, &config);