[PATCH] i2c: i2c-i801 explicitly enables/disables PEC
authorMark M. Hoffman <mhoffman@lightlink.com>
Sun, 6 Nov 2005 22:04:51 +0000 (23:04 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 6 Jan 2006 06:16:20 +0000 (22:16 -0800)
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@lightlink.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/i2c/busses/i2c-i801.c

index ac3eafa8aac02453c3c8a9b4a2d1d6d0de964cb7..1c752ddc10e283494677382963df96d98b076074 100644 (file)
@@ -468,8 +468,7 @@ static s32 i801_access(struct i2c_adapter * adap, u16 addr,
                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_adapter * adap, u16 addr,
                ret = i801_transaction();
        }
 
-       if (hwpec)
-               outb_p(0, SMBAUXCTL);   /* disable hardware PEC */
-
        if(block)
                return ret;
        if(ret)