提交 e647ecf1 编写于 作者: J Jean Delvare 提交者: Greg Kroah-Hartman

[PATCH] hwmon: soften lm75 initialization

The LM75 initialization is a bit agressive, it arbitrarily reconfigures
the chip. Make it only change the bit it needs. This is a port from
the 2.4 kernel version of the driver (lm_sensors).
Signed-off-by: NJean Delvare <khali@linux-fr.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 17f990c8
...@@ -251,8 +251,12 @@ static int lm75_write_value(struct i2c_client *client, u8 reg, u16 value) ...@@ -251,8 +251,12 @@ 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 */ int reg;
lm75_write_value(client, LM75_REG_CONF, 0);
/* Enable if in shutdown mode */
reg = lm75_read_value(client, LM75_REG_CONF);
if (reg >= 0 && (reg & 0x01))
lm75_write_value(client, LM75_REG_CONF, reg & 0xfe);
} }
static struct lm75_data *lm75_update_device(struct device *dev) static struct lm75_data *lm75_update_device(struct device *dev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册