One patch to fix fan detection on NCT6776F.

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQEcBAABAgAGBQJPLedwAAoJEANmWzN1g3l3F18IAJvV8cvTBDr/OV5wmEHx4v7t
 s9l7wfXop2ilsNoAT8mdLwa6ilwatG9k9UhzsF8a2nUR1rNAWA9SFc2v6kLCIZpN
 SVQzh9260X5jrRiUn7dKpLwwxDbepcvHFbpei9Xi/ON97ZjUnHEk27tf/s6MI8ad
 EvCCJR+Lsw1ara6ZX+kQqznUME46dPZA6A5rxXFbRv8QTIe8++f+KSdXWBt8r3yK
 pDfdEGyYwkDoqjUBv2EZ/XMCQdjmdgU9NRExKHJdOyHnea+0RbUik1viuXm7JNQV
 Rd9DtC3vjq8qxCLBhJ1Ay5K8TmAbrgAGGjCo98mNY8D0F9NXL4sfyPW7qxCEa3E=
 =tYxf
 -----END PGP SIGNATURE-----

Merge tag 'hwmon-fixes-for-3.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

One patch to fix fan detection on NCT6776F.

* tag 'hwmon-fixes-for-3.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (w83627ehf) Fix number of fans for NCT6776F
This commit is contained in:
Linus Torvalds 2012-02-06 15:25:48 -08:00
commit 105e518093

View File

@ -1920,9 +1920,26 @@ w83627ehf_check_fan_inputs(const struct w83627ehf_sio_data *sio_data,
fan4min = 0;
fan5pin = 0;
} else if (sio_data->kind == nct6776) {
fan3pin = !(superio_inb(sio_data->sioreg, 0x24) & 0x40);
fan4pin = !!(superio_inb(sio_data->sioreg, 0x1C) & 0x01);
fan5pin = !!(superio_inb(sio_data->sioreg, 0x1C) & 0x02);
bool gpok = superio_inb(sio_data->sioreg, 0x27) & 0x80;
superio_select(sio_data->sioreg, W83627EHF_LD_HWM);
regval = superio_inb(sio_data->sioreg, SIO_REG_ENABLE);
if (regval & 0x80)
fan3pin = gpok;
else
fan3pin = !(superio_inb(sio_data->sioreg, 0x24) & 0x40);
if (regval & 0x40)
fan4pin = gpok;
else
fan4pin = !!(superio_inb(sio_data->sioreg, 0x1C) & 0x01);
if (regval & 0x20)
fan5pin = gpok;
else
fan5pin = !!(superio_inb(sio_data->sioreg, 0x1C) & 0x02);
fan4min = fan4pin;
} else if (sio_data->kind == w83667hg || sio_data->kind == w83667hg_b) {
fan3pin = 1;