platform/x86: thinkpad_acpi: check dytc version for lapmode sysfs
authorMark Pearson <markpearson@lenovo.com>
Thu, 11 Mar 2021 17:48:43 +0000 (12:48 -0500)
committerHans de Goede <hdegoede@redhat.com>
Thu, 18 Mar 2021 12:14:14 +0000 (13:14 +0100)
commit053191b6a4bc2d429e94e866e3b2bc611d5add31
treeb1d5fa06faa535ea9c780330641820ebed22bb70
parent56678a5f44ef5f0ad9a67194bbee2280c6286534
platform/x86: thinkpad_acpi: check dytc version for lapmode sysfs

Lenovo platforms with DYTC versions earlier than version 5 don't set
the lapmode interface correctly, causing issues with thermald on
older platforms.

Add checking to only create the dytc_lapmode interface for version
5 and later.

Fixes: 1ac09656bded ("platform/x86: thinkpad_acpi: Add palm sensor support")
Signed-off-by: Mark Pearson <markpearson@lenovo.com>
Link: https://lore.kernel.org/r/20210311174843.3161-1-markpearson@lenovo.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/thinkpad_acpi.c