mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Add Second Fan Support for Thinkpad P50
@ 2018-04-02 18:27 Alexander Kappner
  2018-04-02 19:08 ` Henrique de Moraes Holschuh
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Alexander Kappner @ 2018-04-02 18:27 UTC (permalink / raw)
  To: ibm-acpi, dvhart, andy
  Cc: ibm-acpi-devel, platform-driver-x86, linux-kernel, Alexander Kappner

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>
---
 drivers/platform/x86/thinkpad_acpi.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index d5eaf3b1..ebdc300 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 = {
 	  .ec = TPID(__id1, __id2),		\
 	  .quirks = __quirks }
 
+#define TPACPI_FAN_QL_BIOS(__id1, __id2, __quirks)	\
+	{ .vendor = PCI_VENDOR_ID_LENOVO,	\
+	  .bios = TPID(__id1, __id2),		\
+	  .ec = TPACPI_MATCH_ANY,		\
+	  .quirks = __quirks }
+
 static const struct tpacpi_quirk fan_quirk_table[] __initconst = {
 	TPACPI_FAN_QI('1', 'Y', TPACPI_FAN_Q1),
 	TPACPI_FAN_QI('7', '8', TPACPI_FAN_Q1),
 	TPACPI_FAN_QI('7', '6', TPACPI_FAN_Q1),
 	TPACPI_FAN_QI('7', '0', TPACPI_FAN_Q1),
 	TPACPI_FAN_QL('7', 'M', TPACPI_FAN_2FAN),
+	TPACPI_FAN_QL_BIOS('N', '1', TPACPI_FAN_2FAN) // Thinkpad P50 has 2 fans
 };
 
 #undef TPACPI_FAN_QL
 #undef TPACPI_FAN_QI
+#undef TPACPI_FAN_QL_BIOS
 
 static int __init fan_init(struct ibm_init_struct *iibm)
 {
-- 
2.1.4

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-07-20 15:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-02 18:27 [PATCH] Add Second Fan Support for Thinkpad P50 Alexander Kappner
2018-04-02 19:08 ` Henrique de Moraes Holschuh
2018-04-02 21:45   ` [ibm-acpi-devel] " Alexander Kappner
2018-04-02 20:22 ` Andy Shevchenko
2018-04-04 23:20   ` Alexander Kappner
2018-04-03  8:13 ` Andy Shevchenko
2018-09-26 14:34 ` Stefan Assmann
2019-07-20 15:22   ` Dario Messina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®