hwmon: (max34440) Fix resetting temperature history
Guenter Roeck
maintainerPATCH 1/1 hwmon: (max34440) Fix resetting temperature history
Temperature history is reset by writing 0x8000 into the peak temperature register, not 0xffff.
Signed-off-by Guenter Roeck <[email protected]>
--- drivers/hwmon/pmbus/max34440.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/hwmon/pmbus/max34440.c +1 -1
@@ -82,7 +82,7 @@ static int max34440_write_word_data(struct i2c_client *client, int page,case PMBUS_VIRT_RESET_TEMP_HISTORY : ret =pmbus_write_word_data (client, page,MAX34440_MFR_TEMPERATURE_PEAK , -0xffff ); +0x8000 );break ;default : ret = -ENODATA ;
Signature · 7 lines
1.7.5.4 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 13 lines · Guenter Roeck
Temperature history is reset by writing
0x8000into the peak temperature register, not0xffff.Signed-off-by Guenter Roeck <[email protected]>--- drivers/hwmon/pmbus/max34440.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/hwmon/pmbus/max34440.c +0
-0
drivers/hwmon/pmbus/max34440.c static int max34440_write_word_data(struct i2c_client *client, int page, · line 88
Quoted 8 lines
drivers/hwmon/pmbus/max34440.c +1
-1@@ -82,7 +82,7 @@ static int max34440_write_word_data(struct i2c_client *client, int page,case PMBUS_VIRT_RESET_TEMP_HISTORY : ret =pmbus_write_word_data (client, page,MAX34440_MFR_TEMPERATURE_PEAK , -0xffff ); +0x8000 );break ;default : ret = -ENODATA ;
Good catch.
Acked-by Jean Delvare <[email protected]>
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors