PEC support in i2c/lm_sensors CVS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jean:

* Jean Delvare <khali at linux-fr.org> [2005-10-30 17:13:35 +0100]:
(snip)
> So, unless someone comes up with good reasons for not backporting the
> new PEC code to i2c/lm_sensors CVS, I will probably do so. I would
> appreciate if someone could take a look at the new Linux 2.6 code
> (2.6.14-git1 and later) and confirm that I got it right. I don't think
> it got any form of review so far, except for the fact that It Works For
> Me (TM).

I finally reviewed those patches; one suggestion, to apply if you like...

This patch tweaks i2c-i801.c so that the driver always sets the SMBAUXCTL
register (which enables/disables PEC) explicitly before each transaction.

Signed-off-by: Mark M. Hoffman <mhoffman at lightlink.com>

--- linux-2.6.14-git5.orig/drivers/i2c/busses/i2c-i801.c
+++ linux-2.6.14-git5/drivers/i2c/busses/i2c-i801.c
@@ -468,8 +468,7 @@ static s32 i801_access(struct i2c_adapte
 		return -1;
 	}
 
-	if (hwpec)
-		outb_p(1, SMBAUXCTL);	/* enable hardware PEC */
+	outb_p(hwpec, SMBAUXCTL);	/* enable/disable hardware PEC */
 
 	if(block)
 		ret = i801_block_transaction(data, read_write, size, hwpec);
@@ -478,9 +477,6 @@ static s32 i801_access(struct i2c_adapte
 		ret = i801_transaction();
 	}
 
-	if (hwpec)
-		outb_p(0, SMBAUXCTL);	/* disable hardware PEC */
-
 	if(block)
 		return ret;
 	if(ret)
-- 
Mark M. Hoffman
mhoffman at lightlink.com





[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux