mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-09-22 12:42:50 +00:00
hwmon: fix dme1737 temp fault attribute
Fix temp?_fault attribute. The temp was incorrectly compared against 0x0800 rather than 0x8000. Only the upper 8 bits are compared as the datasheet doesn't specify what happens to the lower bits in case of a diode fault. Signed-off-by: Juerg Haefliger <juergh at gmail.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
This commit is contained in:
parent
d054612898
commit
c0f31403fe
1 changed files with 1 additions and 1 deletions
|
@ -750,7 +750,7 @@ static ssize_t show_temp(struct device *dev, struct device_attribute *attr,
|
||||||
res = (data->alarms >> DME1737_BIT_ALARM_TEMP[ix]) & 0x01;
|
res = (data->alarms >> DME1737_BIT_ALARM_TEMP[ix]) & 0x01;
|
||||||
break;
|
break;
|
||||||
case SYS_TEMP_FAULT:
|
case SYS_TEMP_FAULT:
|
||||||
res = (data->temp[ix] == 0x0800);
|
res = (((u16)data->temp[ix] & 0xff00) == 0x8000);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
res = 0;
|
res = 0;
|
||||||
|
|
Loading…
Reference in a new issue