Skip to content

Commit

Permalink
[PATCH] i2c: i2c-i801 explicitly enables/disables PEC
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark M. Hoffman authored and Greg Kroah-Hartman committed Jan 6, 2006
1 parent 46f25df commit 2e3e13f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/i2c/busses/i2c-i801.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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)
Expand Down

0 comments on commit 2e3e13f

Please sign in to comment.