aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kappner <agk@godking.net>2018-04-02 14:27:01 -0400
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2018-04-03 04:06:04 -0400
commita986c75a7df027d2c649a8f087be9417372cbfb3 (patch)
treeb9baf1be1a9e156c0b6c2ef091fae860ed7e3762
parent0e5b09b165510e2ea5c526e962c4edadd849ef4c (diff)
platform/x86: thinkpad_acpi: Add 2nd Fan Support for Thinkpad P50
The Thinkpad P50 has 2 fans. Add the 2FAN quirk so the tpacpi driver properly reports both fan speeds. Because the P50 doesn't report the version of its EC controller, we need to identify it by BIOS version (N1). Signed-off-by: Alexander Kappner <agk@godking.net> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> [andy: renamed macro, massaged changelog] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-rw-r--r--drivers/platform/x86/thinkpad_acpi.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index d5eaf3b1edba..761a0ba98fc9 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -8699,16 +8699,24 @@ static const struct attribute_group fan_attr_group = {
8699 .ec = TPID(__id1, __id2), \ 8699 .ec = TPID(__id1, __id2), \
8700 .quirks = __quirks } 8700 .quirks = __quirks }
8701 8701
8702#define TPACPI_FAN_QB(__id1, __id2, __quirks) \
8703 { .vendor = PCI_VENDOR_ID_LENOVO, \
8704 .bios = TPID(__id1, __id2), \
8705 .ec = TPACPI_MATCH_ANY, \
8706 .quirks = __quirks }
8707
8702static const struct tpacpi_quirk fan_quirk_table[] __initconst = { 8708static const struct tpacpi_quirk fan_quirk_table[] __initconst = {
8703 TPACPI_FAN_QI('1', 'Y', TPACPI_FAN_Q1), 8709 TPACPI_FAN_QI('1', 'Y', TPACPI_FAN_Q1),
8704 TPACPI_FAN_QI('7', '8', TPACPI_FAN_Q1), 8710 TPACPI_FAN_QI('7', '8', TPACPI_FAN_Q1),
8705 TPACPI_FAN_QI('7', '6', TPACPI_FAN_Q1), 8711 TPACPI_FAN_QI('7', '6', TPACPI_FAN_Q1),
8706 TPACPI_FAN_QI('7', '0', TPACPI_FAN_Q1), 8712 TPACPI_FAN_QI('7', '0', TPACPI_FAN_Q1),
8707 TPACPI_FAN_QL('7', 'M', TPACPI_FAN_2FAN), 8713 TPACPI_FAN_QL('7', 'M', TPACPI_FAN_2FAN),
8714 TPACPI_FAN_QB('N', '1', TPACPI_FAN_2FAN),
8708}; 8715};
8709 8716
8710#undef TPACPI_FAN_QL 8717#undef TPACPI_FAN_QL
8711#undef TPACPI_FAN_QI 8718#undef TPACPI_FAN_QI
8719#undef TPACPI_FAN_QB
8712 8720
8713static int __init fan_init(struct ibm_init_struct *iibm) 8721static int __init fan_init(struct ibm_init_struct *iibm)
8714{ 8722{