提交 6e7d3b6b 编写于 作者: L Lars-Peter Clausen 提交者: Guenter Roeck

hwmon: (adt7410) Clear unwanted bits in the config register

Make sure to clear the mode bits from the config register before setting the new
mode. Otherwise we might end up with a different mode than we want to.
Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
Reviewed-by: NHartmut Knaack <knaack.h@gmx.de>
Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
上级 d4768280
...@@ -364,6 +364,7 @@ static int adt7410_probe(struct i2c_client *client, ...@@ -364,6 +364,7 @@ static int adt7410_probe(struct i2c_client *client,
/* /*
* Set to 16 bit resolution, continous conversion and comparator mode. * Set to 16 bit resolution, continous conversion and comparator mode.
*/ */
ret &= ~ADT7410_MODE_MASK;
data->config = ret | ADT7410_FULL | ADT7410_RESOLUTION | data->config = ret | ADT7410_FULL | ADT7410_RESOLUTION |
ADT7410_EVENT_MODE; ADT7410_EVENT_MODE;
if (data->config != data->oldconfig) { if (data->config != data->oldconfig) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册