Skip to content

Commit

Permalink
Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelva…
Browse files Browse the repository at this point in the history
…re-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
  • Loading branch information
Linus Torvalds committed Mar 12, 2009
2 parents ab03eca + 51b3e27 commit 5216a3c
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 13 deletions.
10 changes: 10 additions & 0 deletions Documentation/hwmon/lm90
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ Supported chips:
Addresses scanned: I2C 0x4e
Datasheet: Publicly available at the Maxim website
http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3497
* Maxim MAX6648
Prefix: 'max6646'
Addresses scanned: I2C 0x4c
Datasheet: Publicly available at the Maxim website
http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3500
* Maxim MAX6649
Prefix: 'max6646'
Addresses scanned: I2C 0x4c
Expand Down Expand Up @@ -74,6 +79,11 @@ Supported chips:
0x4c, 0x4d and 0x4e
Datasheet: Publicly available at the Maxim website
http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3370
* Maxim MAX6692
Prefix: 'max6646'
Addresses scanned: I2C 0x4c
Datasheet: Publicly available at the Maxim website
http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3500


Author: Jean Delvare <khali@linux-fr.org>
Expand Down
4 changes: 2 additions & 2 deletions drivers/hwmon/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -543,8 +543,8 @@ config SENSORS_LM90
help
If you say yes here you get support for National Semiconductor LM90,
LM86, LM89 and LM99, Analog Devices ADM1032 and ADT7461, and Maxim
MAX6646, MAX6647, MAX6649, MAX6657, MAX6658, MAX6659, MAX6680 and
MAX6681 sensor chips.
MAX6646, MAX6647, MAX6648, MAX6649, MAX6657, MAX6658, MAX6659,
MAX6680, MAX6681 and MAX6692 sensor chips.

This driver can also be built as a module. If so, the module
will be called lm90.
Expand Down
7 changes: 5 additions & 2 deletions drivers/hwmon/abituguru3.c
Original file line number Diff line number Diff line change
Expand Up @@ -760,8 +760,11 @@ static int abituguru3_read_increment_offset(struct abituguru3_data *data,

for (i = 0; i < offset_count; i++)
if ((x = abituguru3_read(data, bank, offset + i, count,
buf + i * count)) != count)
return i * count + (i && (x < 0)) ? 0 : x;
buf + i * count)) != count) {
if (x < 0)
return x;
return i * count + x;
}

return i * count;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/hwmon/f75375s.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ static void f75375_init(struct i2c_client *client, struct f75375_data *data,
static int f75375_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct f75375_data *data = i2c_get_clientdata(client);
struct f75375_data *data;
struct f75375s_platform_data *f75375s_pdata = client->dev.platform_data;
int err;

Expand Down
8 changes: 4 additions & 4 deletions drivers/hwmon/it87.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ static inline u16 FAN16_TO_REG(long rpm)

#define TEMP_TO_REG(val) (SENSORS_LIMIT(((val)<0?(((val)-500)/1000):\
((val)+500)/1000),-128,127))
#define TEMP_FROM_REG(val) (((val)>0x80?(val)-0x100:(val))*1000)
#define TEMP_FROM_REG(val) ((val) * 1000)

#define PWM_TO_REG(val) ((val) >> 1)
#define PWM_FROM_REG(val) (((val)&0x7f) << 1)
Expand Down Expand Up @@ -267,9 +267,9 @@ struct it87_data {
u8 has_fan; /* Bitfield, fans enabled */
u16 fan[5]; /* Register values, possibly combined */
u16 fan_min[5]; /* Register values, possibly combined */
u8 temp[3]; /* Register value */
u8 temp_high[3]; /* Register value */
u8 temp_low[3]; /* Register value */
s8 temp[3]; /* Register value */
s8 temp_high[3]; /* Register value */
s8 temp_low[3]; /* Register value */
u8 sensor; /* Register value */
u8 fan_div[3]; /* Register encoding, shifted right */
u8 vid; /* Register encoding, combined */
Expand Down
8 changes: 4 additions & 4 deletions drivers/hwmon/lm90.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
* supported by this driver. These chips lack the remote temperature
* offset feature.
*
* This driver also supports the MAX6646, MAX6647 and MAX6649 chips
* made by Maxim. These are again similar to the LM86, but they use
* unsigned temperature values and can report temperatures from 0 to
* 145 degrees.
* This driver also supports the MAX6646, MAX6647, MAX6648, MAX6649 and
* MAX6692 chips made by Maxim. These are again similar to the LM86,
* but they use unsigned temperature values and can report temperatures
* from 0 to 145 degrees.
*
* This driver also supports the MAX6680 and MAX6681, two other sensor
* chips made by Maxim. These are quite similar to the other Maxim
Expand Down

0 comments on commit 5216a3c

Please sign in to comment.