summaryrefslogtreecommitdiff
path: root/drivers/hwmon/coretemp.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-09-15 19:34:59 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2011-09-15 19:34:59 (GMT)
commitfa758702c298c98674ec641e9252e507ddaa29be (patch)
tree7972bc8fa8ea465b375e3ede0bb86111b3c16d82 /drivers/hwmon/coretemp.c
parentf1fcd9f0e96d12498afb5543107f560f196cfcf3 (diff)
parentcd5bd3df1a6e7a68454734fb109c409101c20f42 (diff)
downloadlinux-fsl-qoriq-fa758702c298c98674ec641e9252e507ddaa29be.tar.xz
Merge branch 'hwmon-for-linus' of git://github.com/groeck/linux
* 'hwmon-for-linus' of git://github.com/groeck/linux: hwmon: (coretemp) Initialize tmin hwmon: (pmbus) Fix low limit temperature alarms
Diffstat (limited to 'drivers/hwmon/coretemp.c')
-rw-r--r--drivers/hwmon/coretemp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
index 59d83e8..4112576 100644
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -601,7 +601,12 @@ static int create_core_data(struct platform_data *pdata,
err = rdmsr_safe_on_cpu(cpu, tdata->intrpt_reg, &eax, &edx);
if (!err) {
tdata->attr_size += MAX_THRESH_ATTRS;
- tdata->ttarget = tdata->tjmax - ((eax >> 16) & 0x7f) * 1000;
+ tdata->tmin = tdata->tjmax -
+ ((eax & THERM_MASK_THRESHOLD0) >>
+ THERM_SHIFT_THRESHOLD0) * 1000;
+ tdata->ttarget = tdata->tjmax -
+ ((eax & THERM_MASK_THRESHOLD1) >>
+ THERM_SHIFT_THRESHOLD1) * 1000;
}
pdata->core_data[attr_no] = tdata;