diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-03-12 20:33:21 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-12 20:33:21 -0400 |
commit | 480c93df5b99699390f93a7024c9f60d09da0e96 (patch) | |
tree | b93b6c8c71c5f2e716dd05b126e01ef4e20ff0af /drivers/hwmon | |
parent | aecfcde920da8d32949f6cbbc1fc051b4ef9e7be (diff) | |
parent | d820ac4c2fa881079e6b689d2098adce337558ae (diff) |
Merge branch 'core/locking' into tracing/ftrace
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/Kconfig | 4 | ||||
-rw-r--r-- | drivers/hwmon/abituguru3.c | 7 | ||||
-rw-r--r-- | drivers/hwmon/f75375s.c | 2 | ||||
-rw-r--r-- | drivers/hwmon/it87.c | 8 | ||||
-rw-r--r-- | drivers/hwmon/lm85.c | 8 | ||||
-rw-r--r-- | drivers/hwmon/lm90.c | 8 |
6 files changed, 22 insertions, 15 deletions
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig index b84bf066879b..b4eea0292c1a 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig | |||
@@ -543,8 +543,8 @@ config SENSORS_LM90 | |||
543 | help | 543 | help |
544 | If you say yes here you get support for National Semiconductor LM90, | 544 | If you say yes here you get support for National Semiconductor LM90, |
545 | LM86, LM89 and LM99, Analog Devices ADM1032 and ADT7461, and Maxim | 545 | LM86, LM89 and LM99, Analog Devices ADM1032 and ADT7461, and Maxim |
546 | MAX6646, MAX6647, MAX6649, MAX6657, MAX6658, MAX6659, MAX6680 and | 546 | MAX6646, MAX6647, MAX6648, MAX6649, MAX6657, MAX6658, MAX6659, |
547 | MAX6681 sensor chips. | 547 | MAX6680, MAX6681 and MAX6692 sensor chips. |
548 | 548 | ||
549 | This driver can also be built as a module. If so, the module | 549 | This driver can also be built as a module. If so, the module |
550 | will be called lm90. | 550 | will be called lm90. |
diff --git a/drivers/hwmon/abituguru3.c b/drivers/hwmon/abituguru3.c index e52b38806d03..ad2b3431b725 100644 --- a/drivers/hwmon/abituguru3.c +++ b/drivers/hwmon/abituguru3.c | |||
@@ -760,8 +760,11 @@ static int abituguru3_read_increment_offset(struct abituguru3_data *data, | |||
760 | 760 | ||
761 | for (i = 0; i < offset_count; i++) | 761 | for (i = 0; i < offset_count; i++) |
762 | if ((x = abituguru3_read(data, bank, offset + i, count, | 762 | if ((x = abituguru3_read(data, bank, offset + i, count, |
763 | buf + i * count)) != count) | 763 | buf + i * count)) != count) { |
764 | return i * count + (i && (x < 0)) ? 0 : x; | 764 | if (x < 0) |
765 | return x; | ||
766 | return i * count + x; | ||
767 | } | ||
765 | 768 | ||
766 | return i * count; | 769 | return i * count; |
767 | } | 770 | } |
diff --git a/drivers/hwmon/f75375s.c b/drivers/hwmon/f75375s.c index 1692de369969..18a1ba888165 100644 --- a/drivers/hwmon/f75375s.c +++ b/drivers/hwmon/f75375s.c | |||
@@ -617,7 +617,7 @@ static void f75375_init(struct i2c_client *client, struct f75375_data *data, | |||
617 | static int f75375_probe(struct i2c_client *client, | 617 | static int f75375_probe(struct i2c_client *client, |
618 | const struct i2c_device_id *id) | 618 | const struct i2c_device_id *id) |
619 | { | 619 | { |
620 | struct f75375_data *data = i2c_get_clientdata(client); | 620 | struct f75375_data *data; |
621 | struct f75375s_platform_data *f75375s_pdata = client->dev.platform_data; | 621 | struct f75375s_platform_data *f75375s_pdata = client->dev.platform_data; |
622 | int err; | 622 | int err; |
623 | 623 | ||
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c index 95a99c590da2..9157247fed8e 100644 --- a/drivers/hwmon/it87.c +++ b/drivers/hwmon/it87.c | |||
@@ -213,7 +213,7 @@ static inline u16 FAN16_TO_REG(long rpm) | |||
213 | 213 | ||
214 | #define TEMP_TO_REG(val) (SENSORS_LIMIT(((val)<0?(((val)-500)/1000):\ | 214 | #define TEMP_TO_REG(val) (SENSORS_LIMIT(((val)<0?(((val)-500)/1000):\ |
215 | ((val)+500)/1000),-128,127)) | 215 | ((val)+500)/1000),-128,127)) |
216 | #define TEMP_FROM_REG(val) (((val)>0x80?(val)-0x100:(val))*1000) | 216 | #define TEMP_FROM_REG(val) ((val) * 1000) |
217 | 217 | ||
218 | #define PWM_TO_REG(val) ((val) >> 1) | 218 | #define PWM_TO_REG(val) ((val) >> 1) |
219 | #define PWM_FROM_REG(val) (((val)&0x7f) << 1) | 219 | #define PWM_FROM_REG(val) (((val)&0x7f) << 1) |
@@ -267,9 +267,9 @@ struct it87_data { | |||
267 | u8 has_fan; /* Bitfield, fans enabled */ | 267 | u8 has_fan; /* Bitfield, fans enabled */ |
268 | u16 fan[5]; /* Register values, possibly combined */ | 268 | u16 fan[5]; /* Register values, possibly combined */ |
269 | u16 fan_min[5]; /* Register values, possibly combined */ | 269 | u16 fan_min[5]; /* Register values, possibly combined */ |
270 | u8 temp[3]; /* Register value */ | 270 | s8 temp[3]; /* Register value */ |
271 | u8 temp_high[3]; /* Register value */ | 271 | s8 temp_high[3]; /* Register value */ |
272 | u8 temp_low[3]; /* Register value */ | 272 | s8 temp_low[3]; /* Register value */ |
273 | u8 sensor; /* Register value */ | 273 | u8 sensor; /* Register value */ |
274 | u8 fan_div[3]; /* Register encoding, shifted right */ | 274 | u8 fan_div[3]; /* Register encoding, shifted right */ |
275 | u8 vid; /* Register encoding, combined */ | 275 | u8 vid; /* Register encoding, combined */ |
diff --git a/drivers/hwmon/lm85.c b/drivers/hwmon/lm85.c index cfc1ee90f5a3..b251d8674b41 100644 --- a/drivers/hwmon/lm85.c +++ b/drivers/hwmon/lm85.c | |||
@@ -72,6 +72,7 @@ I2C_CLIENT_INSMOD_7(lm85b, lm85c, adm1027, adt7463, adt7468, emc6d100, | |||
72 | #define LM85_COMPANY_SMSC 0x5c | 72 | #define LM85_COMPANY_SMSC 0x5c |
73 | #define LM85_VERSTEP_VMASK 0xf0 | 73 | #define LM85_VERSTEP_VMASK 0xf0 |
74 | #define LM85_VERSTEP_GENERIC 0x60 | 74 | #define LM85_VERSTEP_GENERIC 0x60 |
75 | #define LM85_VERSTEP_GENERIC2 0x70 | ||
75 | #define LM85_VERSTEP_LM85C 0x60 | 76 | #define LM85_VERSTEP_LM85C 0x60 |
76 | #define LM85_VERSTEP_LM85B 0x62 | 77 | #define LM85_VERSTEP_LM85B 0x62 |
77 | #define LM85_VERSTEP_ADM1027 0x60 | 78 | #define LM85_VERSTEP_ADM1027 0x60 |
@@ -334,6 +335,7 @@ static struct lm85_data *lm85_update_device(struct device *dev); | |||
334 | static const struct i2c_device_id lm85_id[] = { | 335 | static const struct i2c_device_id lm85_id[] = { |
335 | { "adm1027", adm1027 }, | 336 | { "adm1027", adm1027 }, |
336 | { "adt7463", adt7463 }, | 337 | { "adt7463", adt7463 }, |
338 | { "adt7468", adt7468 }, | ||
337 | { "lm85", any_chip }, | 339 | { "lm85", any_chip }, |
338 | { "lm85b", lm85b }, | 340 | { "lm85b", lm85b }, |
339 | { "lm85c", lm85c }, | 341 | { "lm85c", lm85c }, |
@@ -408,7 +410,8 @@ static ssize_t show_vid_reg(struct device *dev, struct device_attribute *attr, | |||
408 | struct lm85_data *data = lm85_update_device(dev); | 410 | struct lm85_data *data = lm85_update_device(dev); |
409 | int vid; | 411 | int vid; |
410 | 412 | ||
411 | if (data->type == adt7463 && (data->vid & 0x80)) { | 413 | if ((data->type == adt7463 || data->type == adt7468) && |
414 | (data->vid & 0x80)) { | ||
412 | /* 6-pin VID (VRM 10) */ | 415 | /* 6-pin VID (VRM 10) */ |
413 | vid = vid_from_reg(data->vid & 0x3f, data->vrm); | 416 | vid = vid_from_reg(data->vid & 0x3f, data->vrm); |
414 | } else { | 417 | } else { |
@@ -1153,7 +1156,8 @@ static int lm85_detect(struct i2c_client *client, int kind, | |||
1153 | address, company, verstep); | 1156 | address, company, verstep); |
1154 | 1157 | ||
1155 | /* All supported chips have the version in common */ | 1158 | /* All supported chips have the version in common */ |
1156 | if ((verstep & LM85_VERSTEP_VMASK) != LM85_VERSTEP_GENERIC) { | 1159 | if ((verstep & LM85_VERSTEP_VMASK) != LM85_VERSTEP_GENERIC && |
1160 | (verstep & LM85_VERSTEP_VMASK) != LM85_VERSTEP_GENERIC2) { | ||
1157 | dev_dbg(&adapter->dev, "Autodetection failed: " | 1161 | dev_dbg(&adapter->dev, "Autodetection failed: " |
1158 | "unsupported version\n"); | 1162 | "unsupported version\n"); |
1159 | return -ENODEV; | 1163 | return -ENODEV; |
diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c index 96a701866726..1aff7575799d 100644 --- a/drivers/hwmon/lm90.c +++ b/drivers/hwmon/lm90.c | |||
@@ -32,10 +32,10 @@ | |||
32 | * supported by this driver. These chips lack the remote temperature | 32 | * supported by this driver. These chips lack the remote temperature |
33 | * offset feature. | 33 | * offset feature. |
34 | * | 34 | * |
35 | * This driver also supports the MAX6646, MAX6647 and MAX6649 chips | 35 | * This driver also supports the MAX6646, MAX6647, MAX6648, MAX6649 and |
36 | * made by Maxim. These are again similar to the LM86, but they use | 36 | * MAX6692 chips made by Maxim. These are again similar to the LM86, |
37 | * unsigned temperature values and can report temperatures from 0 to | 37 | * but they use unsigned temperature values and can report temperatures |
38 | * 145 degrees. | 38 | * from 0 to 145 degrees. |
39 | * | 39 | * |
40 | * This driver also supports the MAX6680 and MAX6681, two other sensor | 40 | * This driver also supports the MAX6680 and MAX6681, two other sensor |
41 | * chips made by Maxim. These are quite similar to the other Maxim | 41 | * chips made by Maxim. These are quite similar to the other Maxim |