diff options
| author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-08-04 10:26:03 +1000 | 
|---|---|---|
| committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-08-04 10:26:03 +1000 | 
| commit | 412a4ac5e9cf7fdeb6af562c25547a9b9da7674f (patch) | |
| tree | a8ce13cbc9c47c99799e5e3e3ad26ba78274ee73 /drivers/hwmon/it87.c | |
| parent | e8e5c2155b0035b6e04f29be67f6444bc914005b (diff) | |
| parent | 0c2daaafcdec726e89cbccca61d576de8429c537 (diff) | |
| download | olio-linux-3.10-412a4ac5e9cf7fdeb6af562c25547a9b9da7674f.tar.xz olio-linux-3.10-412a4ac5e9cf7fdeb6af562c25547a9b9da7674f.zip  | |
Merge commit 'gcl/next' into next
Diffstat (limited to 'drivers/hwmon/it87.c')
| -rw-r--r-- | drivers/hwmon/it87.c | 22 | 
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c index 5be09c048c5..25763d2223b 100644 --- a/drivers/hwmon/it87.c +++ b/drivers/hwmon/it87.c @@ -80,6 +80,13 @@ superio_inb(int reg)  	return inb(VAL);  } +static inline void +superio_outb(int reg, int val) +{ +	outb(reg, REG); +	outb(val, VAL); +} +  static int superio_inw(int reg)  {  	int val; @@ -1517,6 +1524,21 @@ static int __init it87_find(unsigned short *address,  			sio_data->vid_value = superio_inb(IT87_SIO_VID_REG);  		reg = superio_inb(IT87_SIO_PINX2_REG); +		/* +		 * The IT8720F has no VIN7 pin, so VCCH should always be +		 * routed internally to VIN7 with an internal divider. +		 * Curiously, there still is a configuration bit to control +		 * this, which means it can be set incorrectly. And even +		 * more curiously, many boards out there are improperly +		 * configured, even though the IT8720F datasheet claims +		 * that the internal routing of VCCH to VIN7 is the default +		 * setting. So we force the internal routing in this case. +		 */ +		if (sio_data->type == it8720 && !(reg & (1 << 1))) { +			reg |= (1 << 1); +			superio_outb(IT87_SIO_PINX2_REG, reg); +			pr_notice("it87: Routing internal VCCH to in7\n"); +		}  		if (reg & (1 << 0))  			pr_info("it87: in3 is VCC (+5V)\n");  		if (reg & (1 << 1))  |