diff options
Diffstat (limited to 'drivers/i2c/busses')
-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 | 2 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-ixp4xx.c | 3 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-pxa.c | 8 | ||||
-rw-r--r-- | drivers/i2c/busses/scx200_acb.c | 7 |
6 files changed, 16 insertions, 7 deletions
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index 510816c16da3..04bee524e31a 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig | |||
@@ -125,6 +125,7 @@ config I2C_I801 | |||
125 | ICH7 | 125 | ICH7 |
126 | ESB2 | 126 | ESB2 |
127 | ICH8 | 127 | ICH8 |
128 | ICH9 | ||
128 | 129 | ||
129 | This driver can also be built as a module. If so, the module | 130 | This driver can also be built as a module. If so, the module |
130 | will be called i2c-i801. | 131 | will be called i2c-i801. |
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index bbb2fbee836f..c7be2fdbd86b 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c | |||
@@ -33,6 +33,7 @@ | |||
33 | ICH7 27DA | 33 | ICH7 27DA |
34 | ESB2 269B | 34 | ESB2 269B |
35 | ICH8 283E | 35 | ICH8 283E |
36 | ICH9 2930 | ||
36 | This driver supports several versions of Intel's I/O Controller Hubs (ICH). | 37 | This driver supports several versions of Intel's I/O Controller Hubs (ICH). |
37 | For SMBus support, they are similar to the PIIX4 and are part | 38 | For SMBus support, they are similar to the PIIX4 and are part |
38 | of Intel's '810' and other chipsets. | 39 | of Intel's '810' and other chipsets. |
@@ -457,6 +458,7 @@ static struct pci_device_id i801_ids[] = { | |||
457 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_17) }, | 458 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_17) }, |
458 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB2_17) }, | 459 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB2_17) }, |
459 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_5) }, | 460 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_5) }, |
461 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9_6) }, | ||
460 | { 0, } | 462 | { 0, } |
461 | }; | 463 | }; |
462 | 464 | ||
diff --git a/drivers/i2c/busses/i2c-isa.c b/drivers/i2c/busses/i2c-isa.c index 4380653748a4..8ed59a2dff53 100644 --- a/drivers/i2c/busses/i2c-isa.c +++ b/drivers/i2c/busses/i2c-isa.c | |||
@@ -91,7 +91,7 @@ int i2c_isa_add_driver(struct i2c_driver *driver) | |||
91 | /* Now look for clients */ | 91 | /* Now look for clients */ |
92 | res = driver->attach_adapter(&isa_adapter); | 92 | res = driver->attach_adapter(&isa_adapter); |
93 | if (res) { | 93 | if (res) { |
94 | dev_err(&isa_adapter.dev, | 94 | dev_dbg(&isa_adapter.dev, |
95 | "Driver %s failed to attach adapter, unregistering\n", | 95 | "Driver %s failed to attach adapter, unregistering\n", |
96 | driver->driver.name); | 96 | driver->driver.name); |
97 | driver_unregister(&driver->driver); | 97 | driver_unregister(&driver->driver); |
diff --git a/drivers/i2c/busses/i2c-ixp4xx.c b/drivers/i2c/busses/i2c-ixp4xx.c index 1ce01fb0ac09..68fe863f9d54 100644 --- a/drivers/i2c/busses/i2c-ixp4xx.c +++ b/drivers/i2c/busses/i2c-ixp4xx.c | |||
@@ -137,7 +137,8 @@ static int ixp4xx_i2c_probe(struct platform_device *plat_dev) | |||
137 | gpio_line_set(gpio->scl_pin, 0); | 137 | gpio_line_set(gpio->scl_pin, 0); |
138 | gpio_line_set(gpio->sda_pin, 0); | 138 | gpio_line_set(gpio->sda_pin, 0); |
139 | 139 | ||
140 | if ((err = i2c_bit_add_bus(&drv_data->adapter) != 0)) { | 140 | err = i2c_bit_add_bus(&drv_data->adapter); |
141 | if (err) { | ||
141 | printk(KERN_ERR "ERROR: Could not install %s\n", plat_dev->dev.bus_id); | 142 | printk(KERN_ERR "ERROR: Could not install %s\n", plat_dev->dev.bus_id); |
142 | 143 | ||
143 | kfree(drv_data); | 144 | kfree(drv_data); |
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index 81050d3c9b21..c95a6c154165 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c | |||
@@ -272,7 +272,8 @@ static int i2c_pxa_wait_slave(struct pxa_i2c *i2c) | |||
272 | dev_dbg(&i2c->adap.dev, "%s: %ld: ISR=%08x, ICR=%08x, IBMR=%02x\n", | 272 | dev_dbg(&i2c->adap.dev, "%s: %ld: ISR=%08x, ICR=%08x, IBMR=%02x\n", |
273 | __func__, (long)jiffies, ISR, ICR, IBMR); | 273 | __func__, (long)jiffies, ISR, ICR, IBMR); |
274 | 274 | ||
275 | if ((ISR & (ISR_UB|ISR_IBB|ISR_SAD)) == ISR_SAD || | 275 | if ((ISR & (ISR_UB|ISR_IBB)) == 0 || |
276 | (ISR & ISR_SAD) != 0 || | ||
276 | (ICR & ICR_SCLE) == 0) { | 277 | (ICR & ICR_SCLE) == 0) { |
277 | if (i2c_debug > 1) | 278 | if (i2c_debug > 1) |
278 | dev_dbg(&i2c->adap.dev, "%s: done\n", __func__); | 279 | dev_dbg(&i2c->adap.dev, "%s: done\n", __func__); |
@@ -492,7 +493,10 @@ static void i2c_pxa_slave_txempty(struct pxa_i2c *i2c, u32 isr) | |||
492 | if (isr & ISR_BED) { | 493 | if (isr & ISR_BED) { |
493 | /* what should we do here? */ | 494 | /* what should we do here? */ |
494 | } else { | 495 | } else { |
495 | int ret = i2c->slave->read(i2c->slave->data); | 496 | int ret = 0; |
497 | |||
498 | if (i2c->slave != NULL) | ||
499 | ret = i2c->slave->read(i2c->slave->data); | ||
496 | 500 | ||
497 | IDBR = ret; | 501 | IDBR = ret; |
498 | ICR |= ICR_TB; /* allow next byte */ | 502 | ICR |= ICR_TB; /* allow next byte */ |
diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c index 32aab0d34ee9..714bae780953 100644 --- a/drivers/i2c/busses/scx200_acb.c +++ b/drivers/i2c/busses/scx200_acb.c | |||
@@ -494,11 +494,12 @@ static __init int scx200_create_pci(const char *text, struct pci_dev *pdev, | |||
494 | iface->pdev = pdev; | 494 | iface->pdev = pdev; |
495 | iface->bar = bar; | 495 | iface->bar = bar; |
496 | 496 | ||
497 | pci_enable_device_bars(iface->pdev, 1 << iface->bar); | 497 | rc = pci_enable_device_bars(iface->pdev, 1 << iface->bar); |
498 | if (rc) | ||
499 | goto errout_free; | ||
498 | 500 | ||
499 | rc = pci_request_region(iface->pdev, iface->bar, iface->adapter.name); | 501 | rc = pci_request_region(iface->pdev, iface->bar, iface->adapter.name); |
500 | 502 | if (rc) { | |
501 | if (rc != 0) { | ||
502 | printk(KERN_ERR NAME ": can't allocate PCI BAR %d\n", | 503 | printk(KERN_ERR NAME ": can't allocate PCI BAR %d\n", |
503 | iface->bar); | 504 | iface->bar); |
504 | goto errout_free; | 505 | goto errout_free; |