Skip to content

Commit 5216a3c

Browse files
committed
Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
* 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6: hwmon: (f75375s) Remove unnecessary and confusing initialization hwmon: (it87) Properly decode -128 degrees C temperature hwmon: (lm90) Document support for the MAX6648/6692 chips hwmon: (abituguru3) Fix I/O error handling
2 parents ab03eca + 51b3e27 commit 5216a3c

File tree

6 files changed

+26
-13
lines changed

6 files changed

+26
-13
lines changed

Documentation/hwmon/lm90

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ Supported chips:
4242
Addresses scanned: I2C 0x4e
4343
Datasheet: Publicly available at the Maxim website
4444
http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3497
45+
* Maxim MAX6648
46+
Prefix: 'max6646'
47+
Addresses scanned: I2C 0x4c
48+
Datasheet: Publicly available at the Maxim website
49+
http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3500
4550
* Maxim MAX6649
4651
Prefix: 'max6646'
4752
Addresses scanned: I2C 0x4c
@@ -74,6 +79,11 @@ Supported chips:
7479
0x4c, 0x4d and 0x4e
7580
Datasheet: Publicly available at the Maxim website
7681
http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3370
82+
* Maxim MAX6692
83+
Prefix: 'max6646'
84+
Addresses scanned: I2C 0x4c
85+
Datasheet: Publicly available at the Maxim website
86+
http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3500
7787

7888

7989
Author: Jean Delvare <khali@linux-fr.org>

drivers/hwmon/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,8 +543,8 @@ config SENSORS_LM90
543543
help
544544
If you say yes here you get support for National Semiconductor LM90,
545545
LM86, LM89 and LM99, Analog Devices ADM1032 and ADT7461, and Maxim
546-
MAX6646, MAX6647, MAX6649, MAX6657, MAX6658, MAX6659, MAX6680 and
547-
MAX6681 sensor chips.
546+
MAX6646, MAX6647, MAX6648, MAX6649, MAX6657, MAX6658, MAX6659,
547+
MAX6680, MAX6681 and MAX6692 sensor chips.
548548

549549
This driver can also be built as a module. If so, the module
550550
will be called lm90.

drivers/hwmon/abituguru3.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -760,8 +760,11 @@ static int abituguru3_read_increment_offset(struct abituguru3_data *data,
760760

761761
for (i = 0; i < offset_count; i++)
762762
if ((x = abituguru3_read(data, bank, offset + i, count,
763-
buf + i * count)) != count)
764-
return i * count + (i && (x < 0)) ? 0 : x;
763+
buf + i * count)) != count) {
764+
if (x < 0)
765+
return x;
766+
return i * count + x;
767+
}
765768

766769
return i * count;
767770
}

drivers/hwmon/f75375s.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ static void f75375_init(struct i2c_client *client, struct f75375_data *data,
617617
static int f75375_probe(struct i2c_client *client,
618618
const struct i2c_device_id *id)
619619
{
620-
struct f75375_data *data = i2c_get_clientdata(client);
620+
struct f75375_data *data;
621621
struct f75375s_platform_data *f75375s_pdata = client->dev.platform_data;
622622
int err;
623623

drivers/hwmon/it87.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ static inline u16 FAN16_TO_REG(long rpm)
213213

214214
#define TEMP_TO_REG(val) (SENSORS_LIMIT(((val)<0?(((val)-500)/1000):\
215215
((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)
217217

218218
#define PWM_TO_REG(val) ((val) >> 1)
219219
#define PWM_FROM_REG(val) (((val)&0x7f) << 1)
@@ -267,9 +267,9 @@ struct it87_data {
267267
u8 has_fan; /* Bitfield, fans enabled */
268268
u16 fan[5]; /* Register values, possibly combined */
269269
u16 fan_min[5]; /* Register values, possibly combined */
270-
u8 temp[3]; /* Register value */
271-
u8 temp_high[3]; /* Register value */
272-
u8 temp_low[3]; /* Register value */
270+
s8 temp[3]; /* Register value */
271+
s8 temp_high[3]; /* Register value */
272+
s8 temp_low[3]; /* Register value */
273273
u8 sensor; /* Register value */
274274
u8 fan_div[3]; /* Register encoding, shifted right */
275275
u8 vid; /* Register encoding, combined */

drivers/hwmon/lm90.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
* supported by this driver. These chips lack the remote temperature
3333
* offset feature.
3434
*
35-
* This driver also supports the MAX6646, MAX6647 and MAX6649 chips
36-
* made by Maxim. These are again similar to the LM86, but they use
37-
* unsigned temperature values and can report temperatures from 0 to
38-
* 145 degrees.
35+
* This driver also supports the MAX6646, MAX6647, MAX6648, MAX6649 and
36+
* MAX6692 chips made by Maxim. These are again similar to the LM86,
37+
* but they use unsigned temperature values and can report temperatures
38+
* from 0 to 145 degrees.
3939
*
4040
* This driver also supports the MAX6680 and MAX6681, two other sensor
4141
* chips made by Maxim. These are quite similar to the other Maxim

0 commit comments

Comments
 (0)