Commit dcf4f5fb authored by Mark M. Hoffman's avatar Mark M. Hoffman Committed by Greg Kroah-Hartman

[PATCH] I2C: remove initialization of limits by lm75 driver

This patch is from the lm_sensors project CVS, from this revision:

	1.44 (mds) remove initialization of limits by driver

It is better to set these limits by a combination of /etc/sensors.conf
and 'sensors -s'; "mechanism not policy."
parent 9059d1bf
...@@ -51,10 +51,6 @@ SENSORS_INSMOD_1(lm75); ...@@ -51,10 +51,6 @@ SENSORS_INSMOD_1(lm75);
#define TEMP_FROM_REG(val) ((((val & 0x7fff) >> 7) * 5) | ((val & 0x8000)?-256:0)) #define TEMP_FROM_REG(val) ((((val & 0x7fff) >> 7) * 5) | ((val & 0x8000)?-256:0))
#define TEMP_TO_REG(val) (SENSORS_LIMIT((val<0?(0x200+((val)/5))<<7:(((val) + 2) / 5) << 7),0,0xffff)) #define TEMP_TO_REG(val) (SENSORS_LIMIT((val<0?(0x200+((val)/5))<<7:(((val) + 2) / 5) << 7),0,0xffff))
/* Initial values */
#define LM75_INIT_TEMP_OS 600
#define LM75_INIT_TEMP_HYST 500
/* Each client has this additional data */ /* Each client has this additional data */
struct lm75_data { struct lm75_data {
struct semaphore update_lock; struct semaphore update_lock;
...@@ -258,10 +254,6 @@ static int lm75_write_value(struct i2c_client *client, u8 reg, u16 value) ...@@ -258,10 +254,6 @@ static int lm75_write_value(struct i2c_client *client, u8 reg, u16 value)
static void lm75_init_client(struct i2c_client *client) static void lm75_init_client(struct i2c_client *client)
{ {
/* Initialize the LM75 chip */ /* Initialize the LM75 chip */
lm75_write_value(client, LM75_REG_TEMP_OS,
TEMP_TO_REG(LM75_INIT_TEMP_OS));
lm75_write_value(client, LM75_REG_TEMP_HYST,
TEMP_TO_REG(LM75_INIT_TEMP_HYST));
lm75_write_value(client, LM75_REG_CONF, 0); lm75_write_value(client, LM75_REG_CONF, 0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment