thermal: intel_pch_thermal: Read large temp values correctly
authorEd Swierk <eswierk@skyportsystems.com>
Thu, 20 Jul 2017 00:47:31 +0000 (17:47 -0700)
committerZhang Rui <rui.zhang@intel.com>
Tue, 8 Aug 2017 08:59:08 +0000 (16:59 +0800)
commit23c973f59057929118ff3c80834d7d0335842c63
tree81289539a3517589f74b4395b069436a21ad1436
parenta742fc10bd7faafa2023c941e4e2c8c20f28aa8a
thermal: intel_pch_thermal: Read large temp values correctly

On all supported platforms, the TS Reading (TSR) field in the
Temperature (TEMP) register is 9 bits wide. Values above 0x100 (78
degrees C) are plausible, so don't mask out the topmost bit. And the
register itself is 16 bits wide, so use readw() rather than readl().

Signed-off-by: Ed Swierk <eswierk@skyportsystems.com>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
drivers/thermal/intel_pch_thermal.c