X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fi2c%2Fbusses%2Fi2c-i801.c;h=e873ba0018b850be7fe57a88ff231228ac38a47b;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=d0612fb8ddb16ef1c978c7abbe67e727aeedfaa5;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index d0612fb8d..e873ba001 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c @@ -28,7 +28,8 @@ 82801CA/CAM 2483 82801DB 24C3 (HW PEC supported, 32 byte buffer not supported) 82801EB 24D3 (HW PEC supported, 32 byte buffer not supported) - + 6300ESB 25A4 + ICH6 266A This driver supports several versions of Intel's I/O Controller Hubs (ICH). For SMBus support, they are similar to the PIIX4 and are part of Intel's '810' and other chipsets. @@ -43,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -96,8 +98,8 @@ /* If force_addr is set to anything different from 0, we forcibly enable the I801 at the given address. VERY DANGEROUS! */ -static int force_addr = 0; -MODULE_PARM(force_addr, "i"); +static u16 force_addr; +module_param(force_addr, ushort, 0); MODULE_PARM_DESC(force_addr, "Forcibly enable the I801 at the given address. " "EXTREMELY DANGEROUS!"); @@ -121,7 +123,8 @@ static int i801_setup(struct pci_dev *dev) I801_dev = dev; if ((dev->device == PCI_DEVICE_ID_INTEL_82801DB_3) || - (dev->device == PCI_DEVICE_ID_INTEL_82801EB_3)) + (dev->device == PCI_DEVICE_ID_INTEL_82801EB_3) || + (dev->device == PCI_DEVICE_ID_INTEL_ESB_4)) isich4 = 1; else isich4 = 0; @@ -205,7 +208,7 @@ static int i801_transaction(void) /* We will always wait for a fraction of a second! */ do { - i2c_delay(1); + msleep(1); temp = inb_p(SMBHSTSTS); } while ((temp & 0x01) && (timeout++ < MAX_TIMEOUT)); @@ -333,7 +336,7 @@ static int i801_block_transaction(union i2c_smbus_data *data, char read_write, timeout = 0; do { temp = inb_p(SMBHSTSTS); - i2c_delay(1); + msleep(1); } while ((!(temp & 0x80)) && (timeout++ < MAX_TIMEOUT)); @@ -393,7 +396,7 @@ static int i801_block_transaction(union i2c_smbus_data *data, char read_write, timeout = 0; do { temp = inb_p(SMBHSTSTS); - i2c_delay(1); + msleep(1); } while ((!(temp & 0x02)) && (timeout++ < MAX_TIMEOUT)); @@ -539,7 +542,7 @@ static struct i2c_algorithm smbus_algorithm = { static struct i2c_adapter i801_adapter = { .owner = THIS_MODULE, - .class = I2C_ADAP_CLASS_SMBUS, + .class = I2C_CLASS_HWMON, .algo = &smbus_algorithm, .name = "unset", }; @@ -576,10 +579,22 @@ static struct pci_device_id i801_ids[] = { .subdevice = PCI_ANY_ID, }, { - .vendor = PCI_VENDOR_ID_INTEL, - .device = PCI_DEVICE_ID_INTEL_82801EB_3, - .subvendor = PCI_ANY_ID, - .subdevice = PCI_ANY_ID, + .vendor = PCI_VENDOR_ID_INTEL, + .device = PCI_DEVICE_ID_INTEL_82801EB_3, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + }, + { + .vendor = PCI_VENDOR_ID_INTEL, + .device = PCI_DEVICE_ID_INTEL_ESB_4, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + }, + { + .vendor = PCI_VENDOR_ID_INTEL, + .device = PCI_DEVICE_ID_INTEL_ICH6_16, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, }, { 0, } }; @@ -608,7 +623,7 @@ static void __devexit i801_remove(struct pci_dev *dev) } static struct pci_driver i801_driver = { - .name = "i801 smbus", + .name = "i801_smbus", .id_table = i801_ids, .probe = i801_probe, .remove = __devexit_p(i801_remove),