platform/x86: thinkpad_acpi: Correct thermal sensor allocation
authorMark Pearson <markpearson@lenovo.com>
Wed, 7 Apr 2021 21:20:15 +0000 (17:20 -0400)
committerHans de Goede <hdegoede@redhat.com>
Tue, 13 Apr 2021 06:29:17 +0000 (08:29 +0200)
commit6759e18e5cd8745a5dfc5726e4a3db5281ec1639
tree90be6e9fa3d9e49309cd405b449e51083febcc84
parent507cf5a2f1e2cd32feaee6e931e18dd74cfe60ce
platform/x86: thinkpad_acpi: Correct thermal sensor allocation

On recent Thinkpad platforms it was reported that temp sensor 11 was
always incorrectly displaying 66C. It turns out the reason for this is
that this location in EC RAM is not a temperature sensor but is the
power supply ID (offset 0xC2).

Based on feedback from the Lenovo firmware team the EC RAM version can
be determined and for the current version (3) only the 0x78 to 0x7F
range is used for temp sensors. I don't have any details for earlier
versions so I have left the implementation unaltered there.

Note - in this block only 0x78 and 0x79 are officially designated (CPU &
GPU sensors). The use of the other locations in the block will vary from
platform to platform; but the existing logic to detect a sensor presence
holds.

Signed-off-by: Mark Pearson <markpearson@lenovo.com>
Link: https://lore.kernel.org/r/20210407212015.298222-1-markpearson@lenovo.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/thinkpad_acpi.c