Skip to content

Commit a986c75

Browse files
Alexander Kappnerandy-shev
authored andcommitted
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 <[email protected]> Acked-by: Henrique de Moraes Holschuh <[email protected]> [andy: renamed macro, massaged changelog] Signed-off-by: Andy Shevchenko <[email protected]>
1 parent 0e5b09b commit a986c75

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/platform/x86/thinkpad_acpi.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8699,16 +8699,24 @@ static const struct attribute_group fan_attr_group = {
86998699
.ec = TPID(__id1, __id2), \
87008700
.quirks = __quirks }
87018701

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+
87028708
static const struct tpacpi_quirk fan_quirk_table[] __initconst = {
87038709
TPACPI_FAN_QI('1', 'Y', TPACPI_FAN_Q1),
87048710
TPACPI_FAN_QI('7', '8', TPACPI_FAN_Q1),
87058711
TPACPI_FAN_QI('7', '6', TPACPI_FAN_Q1),
87068712
TPACPI_FAN_QI('7', '0', TPACPI_FAN_Q1),
87078713
TPACPI_FAN_QL('7', 'M', TPACPI_FAN_2FAN),
8714+
TPACPI_FAN_QB('N', '1', TPACPI_FAN_2FAN),
87088715
};
87098716

87108717
#undef TPACPI_FAN_QL
87118718
#undef TPACPI_FAN_QI
8719+
#undef TPACPI_FAN_QB
87128720

87138721
static int __init fan_init(struct ibm_init_struct *iibm)
87148722
{

0 commit comments

Comments
 (0)