Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a0921b6c07dfbb59ac2d497e96438adaf4940f16
Commit:     a0921b6c07dfbb59ac2d497e96438adaf4940f16
Parent:     369f6f4aec5315012ff5d951e0179f860c35c181
Author:     Jean Delvare <[EMAIL PROTECTED]>
AuthorDate: Sun Jan 27 18:14:50 2008 +0100
Committer:  Jean Delvare <[EMAIL PROTECTED]>
CommitDate: Sun Jan 27 18:14:50 2008 +0100

    i2c-i801: Clear special mode bits as needed
    
    Clear special mode bits (PEC, block buffer) at driver load time,
    you never know in which state the device was left by its last user.
    
    Also make sure that we reset the block buffer mode at the end of every
    transaction, not only when PEC was used.
    
    Signed-off-by: Jean Delvare <[EMAIL PROTECTED]>
---
 drivers/i2c/busses/i2c-i801.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index c31699d..0b1b1ae 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -502,7 +502,7 @@ static s32 i801_access(struct i2c_adapter * adap, u16 addr,
        /* Some BIOSes don't like it when PEC is enabled at reboot or resume
           time, so we forcibly disable it after every transaction. Turn off
           E32B for the same reason. */
-       if (hwpec)
+       if (hwpec || block)
                outb_p(inb_p(SMBAUXCTL) & ~(SMBAUXCTL_CRC | SMBAUXCTL_E32B),
                       SMBAUXCTL);
 
@@ -625,6 +625,11 @@ static int __devinit i801_probe(struct pci_dev *dev, const 
struct pci_device_id
        else
                dev_dbg(&dev->dev, "SMBus using PCI Interrupt\n");
 
+       /* Clear special mode bits */
+       if (i801_features & (FEATURE_SMBUS_PEC | FEATURE_BLOCK_BUFFER))
+               outb_p(inb_p(SMBAUXCTL) & ~(SMBAUXCTL_CRC | SMBAUXCTL_E32B),
+                      SMBAUXCTL);
+
        /* set up the sysfs linkage to our parent device */
        i801_adapter.dev.parent = &dev->dev;
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to