thinkpad_acpi: Add support for dual fan control on select models
Quoted 11 lines · Lars
This patch allows controlling multiple fans as if they were a single fan.
This adds P52, P72, X1E, and X1E gen2 to dual fan quirks. Both fans are controlled together.
Tested on an X1 Extreme Gen2.
The patch is defensive, it adds only specific supported machines, and falls back to the old behavior if both fans cannot be controlled.
Quoted 7 lines
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 [1]. Thanks to Github users voidworker and civic9.
GitHub
Quoted 3 lines
The BIOS ids are taken from there. The X1E gen2 id is verified on my machine.
I got two mails, which one is correct?
So, please send a new version only one time, thanks.
Some comments below.
Quoted 1 line
[1]: vmatare/thinkfan#58
Please, use full URL her.
...
Quoted 2 lines
+ if (((level < 0) || (level > 7)))
return -EINVAL;
Maybe you didn't check what I did for previous version... Here is too many parentheses.
Review
Quoted 7 lines
(quoted diff) +7
-0+ TPACPI_Q_LNV3('N', '1', 'D', TPACPI_FAN_2CTL), /* P70 */ + TPACPI_Q_LNV3('N', '1', 'E', TPACPI_FAN_2CTL), /* P50 */ + TPACPI_Q_LNV3('N', '1', 'T', TPACPI_FAN_2CTL), /* P71 */ + TPACPI_Q_LNV3('N', '1', 'U', TPACPI_FAN_2CTL), /* P51 */ + TPACPI_Q_LNV3('N', '2', 'C', TPACPI_FAN_2CTL), /* P52 / P72 */ + TPACPI_Q_LNV3('N', '2', 'E', TPACPI_FAN_2CTL), /* X1 Extreme (1st gen) */ + TPACPI_Q_LNV3('N', '2', 'O', TPACPI_FAN_2CTL), /* X1 Extreme (2nd gen) */
This has been expanded, but commit message still old, please, update commit message as well (and perhaps give a credit to people who suggested / tested other models).
Signature · 2 lines
With Best Regards, Andy Shevchenko