> 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...
>
This sounds much nastier than I first thought. I will try to find a
somewhat clean way to implement this.
> > > 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?
Actually, the EC version is in dmidecode, but in the OEM-specific
section. My EC version is 'N1EHT32W'.
Handle 0x003F, DMI type 140, 15 bytes
OEM-specific Type
Header and Data:
8C 0F 3F 00 4C 45 4E 4F 56 4F 0B 07 01 01 02
Strings:
N1EHT32W
02/02/2016
> > 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.
The P70 has two fans like the P50, so I'm confident there is no need for any
special treatment.
|