]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: thinkpad_acpi: Add support for dual fan control
authorLars Hofhansl <larsh@apache.org>
Thu, 23 Apr 2020 21:57:09 +0000 (14:57 -0700)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 27 Apr 2020 09:52:29 +0000 (12:52 +0300)
commit0b1ca729e3628cc1150a82bacc1fb3b742a6e477
tree6597092156f958238f736a2d0c1e2f6b63f89bb6
parent4040c5fac9166b599a5a91bf8d5976ae2c854d01
platform/x86: thinkpad_acpi: Add support for dual fan control

This adds dual fan control for the following models:
P50, P51, P52, P70, P71, P72, P1 gen1, P2 gen2, X1E gen1 and X1E gen2.

Both fans are controlled together as if they were a single fan.

Tested on an X1 Extreme Gen1, an X1 Extreme Gen2, and a P50.

The patch is defensive, it adds only specific supported machines, and falls
back to the old behavior if both fans cannot be controlled.

Background:
I tested the BIOS default behavior on my X1E gen2 and both fans are always
changed together. So rather than adding controls for each fan, this controls
both fans together as the BIOS would do.

This was inspired by a discussion on dual fan support for the thinkfan tool
(see link below). All BIOS IDs are taken from there. The X1E gen2 ID is
verified on my machine.

Thanks to GitHub users voidworker and civic9 for the earlier patches and
BIOS IDs, and to users peter-stoll and sassman for testing the patch on
their machines.

BugLink: https://github.com/vmatare/thinkfan/issues/58
Signed-off-by: Lars Hofhansl <larsh@apache.org>
[andy: massaged commit message to capitalize ID and convert to BugLink]
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/thinkpad_acpi.c