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: Lars-Peter Clausen <[email protected]>
Reviewed-by: Hartmut Knaack <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
/*
* Set to 16 bit resolution, continous conversion and comparator mode.
*/
+ ret &= ~ADT7410_MODE_MASK;
data->config = ret | ADT7410_FULL | ADT7410_RESOLUTION |
ADT7410_EVENT_MODE;
if (data->config != data->oldconfig) {