diff options
| author | Adrian Bunk <bunk@r063144.stusta.swh.mhn.de> | 2006-03-20 12:30:36 -0500 |
|---|---|---|
| committer | Adrian Bunk <bunk@r063144.stusta.swh.mhn.de> | 2006-03-20 12:30:36 -0500 |
| commit | 0f76ee451484d02c7405d92e7bceb39b415abb01 (patch) | |
| tree | 9722f84281f786ba48971dde057f5171a49969e4 /drivers/i2c | |
| parent | 01d206a7c1167639f6ca6dac22140fbdca017558 (diff) | |
| parent | 7705a8792b0fc82fd7d4dd923724606bbfd9fb20 (diff) | |
Merge with git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'drivers/i2c')
| -rw-r--r-- | drivers/i2c/algos/i2c-algo-sibyte.c | 2 | ||||
| -rw-r--r-- | drivers/i2c/busses/Kconfig | 1 | ||||
| -rw-r--r-- | drivers/i2c/busses/i2c-i801.c | 2 | ||||
| -rw-r--r-- | drivers/i2c/busses/i2c-isa.c | 12 | ||||
| -rw-r--r-- | drivers/i2c/busses/i2c-parport-light.c | 9 | ||||
| -rw-r--r-- | drivers/i2c/busses/i2c-parport.c | 7 | ||||
| -rw-r--r-- | drivers/i2c/busses/i2c-pxa.c | 2 | ||||
| -rw-r--r-- | drivers/i2c/i2c-core.c | 15 |
8 files changed, 25 insertions, 25 deletions
diff --git a/drivers/i2c/algos/i2c-algo-sibyte.c b/drivers/i2c/algos/i2c-algo-sibyte.c index 938848ae162d..3df3f09995c2 100644 --- a/drivers/i2c/algos/i2c-algo-sibyte.c +++ b/drivers/i2c/algos/i2c-algo-sibyte.c | |||
| @@ -202,7 +202,7 @@ EXPORT_SYMBOL(i2c_sibyte_del_bus); | |||
| 202 | #ifdef MODULE | 202 | #ifdef MODULE |
| 203 | MODULE_AUTHOR("Kip Walker, Broadcom Corp."); | 203 | MODULE_AUTHOR("Kip Walker, Broadcom Corp."); |
| 204 | MODULE_DESCRIPTION("SiByte I2C-Bus algorithm"); | 204 | MODULE_DESCRIPTION("SiByte I2C-Bus algorithm"); |
| 205 | MODULE_PARM(bit_scan, "i"); | 205 | module_param(bit_scan, int, 0); |
| 206 | MODULE_PARM_DESC(bit_scan, "Scan for active chips on the bus"); | 206 | MODULE_PARM_DESC(bit_scan, "Scan for active chips on the bus"); |
| 207 | MODULE_LICENSE("GPL"); | 207 | MODULE_LICENSE("GPL"); |
| 208 | 208 | ||
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index 08d5b8fed2dc..ff92735c7c85 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig | |||
| @@ -124,6 +124,7 @@ config I2C_I801 | |||
| 124 | ICH6 | 124 | ICH6 |
| 125 | ICH7 | 125 | ICH7 |
| 126 | ESB2 | 126 | ESB2 |
| 127 | ICH8 | ||
| 127 | 128 | ||
| 128 | This driver can also be built as a module. If so, the module | 129 | This driver can also be built as a module. If so, the module |
| 129 | will be called i2c-i801. | 130 | will be called i2c-i801. |
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index 1c752ddc10e2..8e0f3158215f 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c | |||
| @@ -32,6 +32,7 @@ | |||
| 32 | ICH6 266A | 32 | ICH6 266A |
| 33 | ICH7 27DA | 33 | ICH7 27DA |
| 34 | ESB2 269B | 34 | ESB2 269B |
| 35 | ICH8 283E | ||
| 35 | This driver supports several versions of Intel's I/O Controller Hubs (ICH). | 36 | This driver supports several versions of Intel's I/O Controller Hubs (ICH). |
| 36 | For SMBus support, they are similar to the PIIX4 and are part | 37 | For SMBus support, they are similar to the PIIX4 and are part |
| 37 | of Intel's '810' and other chipsets. | 38 | of Intel's '810' and other chipsets. |
| @@ -527,6 +528,7 @@ static struct pci_device_id i801_ids[] = { | |||
| 527 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_16) }, | 528 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_16) }, |
| 528 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_17) }, | 529 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_17) }, |
| 529 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB2_17) }, | 530 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB2_17) }, |
| 531 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_5) }, | ||
| 530 | { 0, } | 532 | { 0, } |
| 531 | }; | 533 | }; |
| 532 | 534 | ||
diff --git a/drivers/i2c/busses/i2c-isa.c b/drivers/i2c/busses/i2c-isa.c index 9f2ffef4d812..4344ae6b1fcb 100644 --- a/drivers/i2c/busses/i2c-isa.c +++ b/drivers/i2c/busses/i2c-isa.c | |||
| @@ -72,16 +72,6 @@ static ssize_t show_adapter_name(struct device *dev, | |||
| 72 | } | 72 | } |
| 73 | static DEVICE_ATTR(name, S_IRUGO, show_adapter_name, NULL); | 73 | static DEVICE_ATTR(name, S_IRUGO, show_adapter_name, NULL); |
| 74 | 74 | ||
| 75 | static int i2c_isa_device_probe(struct device *dev) | ||
| 76 | { | ||
| 77 | return -ENODEV; | ||
| 78 | } | ||
| 79 | |||
| 80 | static int i2c_isa_device_remove(struct device *dev) | ||
| 81 | { | ||
| 82 | return 0; | ||
| 83 | } | ||
| 84 | |||
| 85 | 75 | ||
| 86 | /* We implement an interface which resembles i2c_{add,del}_driver, | 76 | /* We implement an interface which resembles i2c_{add,del}_driver, |
| 87 | but for i2c-isa drivers. We don't have to remember and handle lists | 77 | but for i2c-isa drivers. We don't have to remember and handle lists |
| @@ -93,8 +83,6 @@ int i2c_isa_add_driver(struct i2c_driver *driver) | |||
| 93 | 83 | ||
| 94 | /* Add the driver to the list of i2c drivers in the driver core */ | 84 | /* Add the driver to the list of i2c drivers in the driver core */ |
| 95 | driver->driver.bus = &i2c_bus_type; | 85 | driver->driver.bus = &i2c_bus_type; |
| 96 | driver->driver.probe = i2c_isa_device_probe; | ||
| 97 | driver->driver.remove = i2c_isa_device_remove; | ||
| 98 | res = driver_register(&driver->driver); | 86 | res = driver_register(&driver->driver); |
| 99 | if (res) | 87 | if (res) |
| 100 | return res; | 88 | return res; |
diff --git a/drivers/i2c/busses/i2c-parport-light.c b/drivers/i2c/busses/i2c-parport-light.c index 3e5eba9fcacb..c63025a4c861 100644 --- a/drivers/i2c/busses/i2c-parport-light.c +++ b/drivers/i2c/busses/i2c-parport-light.c | |||
| @@ -121,14 +121,11 @@ static struct i2c_adapter parport_adapter = { | |||
| 121 | 121 | ||
| 122 | static int __init i2c_parport_init(void) | 122 | static int __init i2c_parport_init(void) |
| 123 | { | 123 | { |
| 124 | int type_count; | 124 | if (type < 0 || type >= ARRAY_SIZE(adapter_parm)) { |
| 125 | |||
| 126 | type_count = sizeof(adapter_parm)/sizeof(struct adapter_parm); | ||
| 127 | if (type < 0 || type >= type_count) { | ||
| 128 | printk(KERN_WARNING "i2c-parport: invalid type (%d)\n", type); | 125 | printk(KERN_WARNING "i2c-parport: invalid type (%d)\n", type); |
| 129 | type = 0; | 126 | type = 0; |
| 130 | } | 127 | } |
| 131 | 128 | ||
| 132 | if (base == 0) { | 129 | if (base == 0) { |
| 133 | printk(KERN_INFO "i2c-parport: using default base 0x%x\n", DEFAULT_BASE); | 130 | printk(KERN_INFO "i2c-parport: using default base 0x%x\n", DEFAULT_BASE); |
| 134 | base = DEFAULT_BASE; | 131 | base = DEFAULT_BASE; |
| @@ -152,7 +149,7 @@ static int __init i2c_parport_init(void) | |||
| 152 | release_region(base, 3); | 149 | release_region(base, 3); |
| 153 | return -ENODEV; | 150 | return -ENODEV; |
| 154 | } | 151 | } |
| 155 | 152 | ||
| 156 | return 0; | 153 | return 0; |
| 157 | } | 154 | } |
| 158 | 155 | ||
diff --git a/drivers/i2c/busses/i2c-parport.c b/drivers/i2c/busses/i2c-parport.c index 2854d858fc9b..7e2e8cd1c14a 100644 --- a/drivers/i2c/busses/i2c-parport.c +++ b/drivers/i2c/busses/i2c-parport.c | |||
| @@ -241,14 +241,11 @@ static struct parport_driver i2c_parport_driver = { | |||
| 241 | 241 | ||
| 242 | static int __init i2c_parport_init(void) | 242 | static int __init i2c_parport_init(void) |
| 243 | { | 243 | { |
| 244 | int type_count; | 244 | if (type < 0 || type >= ARRAY_SIZE(adapter_parm)) { |
| 245 | |||
| 246 | type_count = sizeof(adapter_parm)/sizeof(struct adapter_parm); | ||
| 247 | if (type < 0 || type >= type_count) { | ||
| 248 | printk(KERN_WARNING "i2c-parport: invalid type (%d)\n", type); | 245 | printk(KERN_WARNING "i2c-parport: invalid type (%d)\n", type); |
| 249 | type = 0; | 246 | type = 0; |
| 250 | } | 247 | } |
| 251 | 248 | ||
| 252 | return parport_register_driver(&i2c_parport_driver); | 249 | return parport_register_driver(&i2c_parport_driver); |
| 253 | } | 250 | } |
| 254 | 251 | ||
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index 86e2234faf80..7579f4b256a8 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c | |||
| @@ -861,7 +861,7 @@ static irqreturn_t i2c_pxa_handler(int this_irq, void *dev_id, struct pt_regs *r | |||
| 861 | decode_ISR(isr); | 861 | decode_ISR(isr); |
| 862 | } | 862 | } |
| 863 | 863 | ||
| 864 | if (i2c->irqlogidx < sizeof(i2c->isrlog)/sizeof(u32)) | 864 | if (i2c->irqlogidx < ARRAY_SIZE(i2c->isrlog)) |
| 865 | i2c->isrlog[i2c->irqlogidx++] = isr; | 865 | i2c->isrlog[i2c->irqlogidx++] = isr; |
| 866 | 866 | ||
| 867 | show_state(i2c); | 867 | show_state(i2c); |
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 0ce58b506046..1a2c9ab5d9e3 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c | |||
| @@ -946,6 +946,20 @@ s32 i2c_smbus_read_i2c_block_data(struct i2c_client *client, u8 command, u8 *val | |||
| 946 | } | 946 | } |
| 947 | } | 947 | } |
| 948 | 948 | ||
| 949 | s32 i2c_smbus_write_i2c_block_data(struct i2c_client *client, u8 command, | ||
| 950 | u8 length, u8 *values) | ||
| 951 | { | ||
| 952 | union i2c_smbus_data data; | ||
| 953 | |||
| 954 | if (length > I2C_SMBUS_BLOCK_MAX) | ||
| 955 | length = I2C_SMBUS_BLOCK_MAX; | ||
| 956 | data.block[0] = length; | ||
| 957 | memcpy(data.block + 1, values, length); | ||
| 958 | return i2c_smbus_xfer(client->adapter, client->addr, client->flags, | ||
| 959 | I2C_SMBUS_WRITE, command, | ||
| 960 | I2C_SMBUS_I2C_BLOCK_DATA, &data); | ||
| 961 | } | ||
| 962 | |||
| 949 | /* Simulate a SMBus command using the i2c protocol | 963 | /* Simulate a SMBus command using the i2c protocol |
| 950 | No checking of parameters is done! */ | 964 | No checking of parameters is done! */ |
| 951 | static s32 i2c_smbus_xfer_emulated(struct i2c_adapter * adapter, u16 addr, | 965 | static s32 i2c_smbus_xfer_emulated(struct i2c_adapter * adapter, u16 addr, |
| @@ -1150,6 +1164,7 @@ EXPORT_SYMBOL(i2c_smbus_read_word_data); | |||
| 1150 | EXPORT_SYMBOL(i2c_smbus_write_word_data); | 1164 | EXPORT_SYMBOL(i2c_smbus_write_word_data); |
| 1151 | EXPORT_SYMBOL(i2c_smbus_write_block_data); | 1165 | EXPORT_SYMBOL(i2c_smbus_write_block_data); |
| 1152 | EXPORT_SYMBOL(i2c_smbus_read_i2c_block_data); | 1166 | EXPORT_SYMBOL(i2c_smbus_read_i2c_block_data); |
| 1167 | EXPORT_SYMBOL(i2c_smbus_write_i2c_block_data); | ||
| 1153 | 1168 | ||
| 1154 | MODULE_AUTHOR("Simon G. Vogl <simon@tk.uni-linz.ac.at>"); | 1169 | MODULE_AUTHOR("Simon G. Vogl <simon@tk.uni-linz.ac.at>"); |
| 1155 | MODULE_DESCRIPTION("I2C-Bus main module"); | 1170 | MODULE_DESCRIPTION("I2C-Bus main module"); |
