Patch "hwmon: (adt7411) set bit 3 in CFG1 register" has been added to the 4.7-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
hwmon: (adt7411) set bit 3 in CFG1 register
to the 4.7-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
hwmon-adt7411-set-bit-3-in-cfg1-register.patch
and it can be found in the queue-4.7 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
b53893aae441a034bf4dbbad42fe218561d7d81fMon Sep 17 00:00:00 2001
From: Michael Walle <[email protected]>
Date: Tue, 19 Jul 2016 16:43:26 +0200
Subject: hwmon: (adt7411) set bit 3 in CFG1 register
From: Michael Walle <[email protected]>
commit b53893aae441a034bf4dbbad42fe218561d7d81f upstream.
According to the datasheet you should only write 1 to this bit. If it is not set, at least AIN3 will return bad values on newer silicon revisions.
--- drivers/hwmon/adt7411.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/hwmon/adt7411.c +4 -1
@@ -30,6 +30,7 @@#define ADT7411_REG_CFG1 0x18#define ADT7411_CFG1_START_MONITOR (1 << 0) +#define ADT7411_CFG1_RESERVED_BIT3 (1 << 3)#define ADT7411_REG_CFG2 0x19#define ADT7411_CFG2_DISABLE_AVG (1 << 5)
@@ -296,8 +297,10 @@ static int adt7411_probe(struct i2c_cliemutex_init (&data->device_lock);mutex_init (&data->update_lock); +/* According to the datasheet, we must only write 1 to bit 3 */ ret =adt7411_modify_bit (client,ADT7411_REG_CFG1 , -ADT7411_CFG1_START_MONITOR ,1 ); +ADT7411_CFG1_RESERVED_BIT3 + |ADT7411_CFG1_START_MONITOR ,1 );if (ret <0 )return ret;
Patches currently in stable-queue which might be from [email protected] are
queue-4.7/hwmon-adt7411-set-bit-3-in-cfg1-register.patch