git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.5.x5
[linux-2.6.git]
/
drivers
/
i2c
/
chips
/
w83l785ts.c
diff --git
a/drivers/i2c/chips/w83l785ts.c
b/drivers/i2c/chips/w83l785ts.c
index
0062d86
..
66b3b8d
100644
(file)
--- a/
drivers/i2c/chips/w83l785ts.c
+++ b/
drivers/i2c/chips/w83l785ts.c
@@
-32,6
+32,7
@@
#include <linux/config.h>
#include <linux/module.h>
#include <linux/config.h>
#include <linux/module.h>
+#include <linux/delay.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/i2c.h>
@@
-46,9
+47,7
@@
*/
static unsigned short normal_i2c[] = { 0x2e, I2C_CLIENT_END };
*/
static unsigned short normal_i2c[] = { 0x2e, I2C_CLIENT_END };
-static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
-static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END };
/*
* Insmod parameters
/*
* Insmod parameters
@@
-136,8
+135,8
@@
static ssize_t show_temp_over(struct device *dev, char *buf)
return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_over));
}
return sprintf(buf, "%d\n", TEMP_FROM_REG(data->temp_over));
}
-static DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL)
-static DEVICE_ATTR(temp1_max, S_IRUGO, show_temp_over, NULL)
+static DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL)
;
+static DEVICE_ATTR(temp1_max, S_IRUGO, show_temp_over, NULL)
;
/*
* Real code
/*
* Real code
@@
-145,7
+144,7
@@
static DEVICE_ATTR(temp1_max, S_IRUGO, show_temp_over, NULL)
static int w83l785ts_attach_adapter(struct i2c_adapter *adapter)
{
static int w83l785ts_attach_adapter(struct i2c_adapter *adapter)
{
- if (!(adapter->class & I2C_
ADAP_CLASS_SMBUS
))
+ if (!(adapter->class & I2C_
CLASS_HWMON
))
return 0;
return i2c_detect(adapter, &addr_data, w83l785ts_detect);
}
return 0;
return i2c_detect(adapter, &addr_data, w83l785ts_detect);
}
@@
-281,14
+280,17
@@
static u8 w83l785ts_read_value(struct i2c_client *client, u8 reg, u8 defval)
* default value requested by the caller. */
for (i = 1; i <= MAX_RETRIES; i++) {
value = i2c_smbus_read_byte_data(client, reg);
* default value requested by the caller. */
for (i = 1; i <= MAX_RETRIES; i++) {
value = i2c_smbus_read_byte_data(client, reg);
- if (value >= 0)
+ if (value >= 0) {
+ dev_dbg(&client->dev, "Read 0x%02x from register "
+ "0x%02x.\n", value, reg);
return value;
return value;
+ }
dev_dbg(&client->dev, "Read failed, will retry in %d.\n", i);
dev_dbg(&client->dev, "Read failed, will retry in %d.\n", i);
-
i2c_delay
(i);
+
msleep
(i);
}
}
- dev_err(&client->dev, "Couldn't read value from register. "
- "Please report.\n");
+ dev_err(&client->dev, "Couldn't read value from register
0x%02x
. "
+ "Please report.\n"
, reg
);
return defval;
}
return defval;
}