Re: [ibm-acpi-devel] Second fan on Thinkpad P50
Linux kernel driver for ThinkPad laptops
Brought to you by:
akw,
hmholschuh
From: Henrique de M. H. <hm...@hm...> - 2016-04-10 19:07:23
|
On Sun, 10 Apr 2016, Matthias Hochsteger wrote: > Here is the latest version of my patch. I added quirks to recognize the > second fan and cleaned the code, any comments are welcome: > http://pastebin.com/eVPcnvfK > > > From your patch, I understand the select_fan() thing we already have for the > > X60/X61 actually changes which fan is being controlled on the P50? > > That is correct, the same mechanism/bit is used to select the active > fan. But there is some strange behavior when reading the status > register. Regardless of which fan is currently selected, the status > register always reads the status of fan1. This means I can set the fan > speed levels individually, but reading pwm2_enable or pwm2 always returns > the corresponding value of fan1. So, we'd have to implement them in software through a quirk, sort of like the T43 fan quirk, only worse. We have to assume the initial state (like the T43 quirk). Unlike the t43 quirk, we have to track the states we write, and assume nobody else will change it behind our backs. It is probably safe to assume fan2 defaults to "auto" mode like fan1 by the time the operating system is started. However, please check if there are any related BIOS toggles... > > Otherwise, we can simply add a new quirk for second-fan-control-ok, and > > enable second-fan control only for the P50, and not for the X60/X61. > > I added a quirk based on 'bios_model' (first two characters of BIOS > version), since the EC version is not read correctly by the module. The EC version is not present in dmidecode output anymore, is it? Because we CAN get it out of the EC register dump directly (the BIOS and the windows drivers certainly manage to do so somehow), but DMI data is *much* preferred. > The Lenovo P70, which is very similar to the P50, shares these first > two characters 'N1' according to Lenovo's release notes, so it should > be automatically detected too. Some testing there is needed. > https://download.lenovo.com/pccbbs/mobiles/n1duj12w.txt If it has the same EC firmware, it will not misbehave if we try to mess with fan2. But if it doesn't have a fan2, it would be nice to not expose it. -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh |