diff options
Diffstat (limited to 'drivers/i2c')
| -rw-r--r-- | drivers/i2c/busses/i2c-designware-master.c | 5 | ||||
| -rw-r--r-- | drivers/i2c/busses/i2c-pmcmsp.c | 4 | ||||
| -rw-r--r-- | drivers/i2c/busses/i2c-viperboard.c | 2 | ||||
| -rw-r--r-- | drivers/i2c/i2c-core-acpi.c | 13 | ||||
| -rw-r--r-- | drivers/i2c/i2c-core-base.c | 2 |
5 files changed, 18 insertions, 8 deletions
diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c index fd36c39ddf4e..0cdba29ae0a9 100644 --- a/drivers/i2c/busses/i2c-designware-master.c +++ b/drivers/i2c/busses/i2c-designware-master.c | |||
| @@ -209,7 +209,10 @@ static void i2c_dw_xfer_init(struct dw_i2c_dev *dev) | |||
| 209 | i2c_dw_disable_int(dev); | 209 | i2c_dw_disable_int(dev); |
| 210 | 210 | ||
| 211 | /* Enable the adapter */ | 211 | /* Enable the adapter */ |
| 212 | __i2c_dw_enable_and_wait(dev, true); | 212 | __i2c_dw_enable(dev, true); |
| 213 | |||
| 214 | /* Dummy read to avoid the register getting stuck on Bay Trail */ | ||
| 215 | dw_readl(dev, DW_IC_ENABLE_STATUS); | ||
| 213 | 216 | ||
| 214 | /* Clear and enable interrupts */ | 217 | /* Clear and enable interrupts */ |
| 215 | dw_readl(dev, DW_IC_CLR_INTR); | 218 | dw_readl(dev, DW_IC_CLR_INTR); |
diff --git a/drivers/i2c/busses/i2c-pmcmsp.c b/drivers/i2c/busses/i2c-pmcmsp.c index 2aa0e83174c5..dae8ac618a52 100644 --- a/drivers/i2c/busses/i2c-pmcmsp.c +++ b/drivers/i2c/busses/i2c-pmcmsp.c | |||
| @@ -564,10 +564,10 @@ static int pmcmsptwi_master_xfer(struct i2c_adapter *adap, | |||
| 564 | * TODO: We could potentially loop and retry in the case | 564 | * TODO: We could potentially loop and retry in the case |
| 565 | * of MSP_TWI_XFER_TIMEOUT. | 565 | * of MSP_TWI_XFER_TIMEOUT. |
| 566 | */ | 566 | */ |
| 567 | return -1; | 567 | return -EIO; |
| 568 | } | 568 | } |
| 569 | 569 | ||
| 570 | return 0; | 570 | return num; |
| 571 | } | 571 | } |
| 572 | 572 | ||
| 573 | static u32 pmcmsptwi_i2c_func(struct i2c_adapter *adapter) | 573 | static u32 pmcmsptwi_i2c_func(struct i2c_adapter *adapter) |
diff --git a/drivers/i2c/busses/i2c-viperboard.c b/drivers/i2c/busses/i2c-viperboard.c index e4be86b3de9a..7235c7302bb7 100644 --- a/drivers/i2c/busses/i2c-viperboard.c +++ b/drivers/i2c/busses/i2c-viperboard.c | |||
| @@ -337,7 +337,7 @@ static int vprbrd_i2c_xfer(struct i2c_adapter *i2c, struct i2c_msg *msgs, | |||
| 337 | } | 337 | } |
| 338 | mutex_unlock(&vb->lock); | 338 | mutex_unlock(&vb->lock); |
| 339 | } | 339 | } |
| 340 | return 0; | 340 | return num; |
| 341 | error: | 341 | error: |
| 342 | mutex_unlock(&vb->lock); | 342 | mutex_unlock(&vb->lock); |
| 343 | return error; | 343 | return error; |
diff --git a/drivers/i2c/i2c-core-acpi.c b/drivers/i2c/i2c-core-acpi.c index a9126b3cda61..7c3b4740b94b 100644 --- a/drivers/i2c/i2c-core-acpi.c +++ b/drivers/i2c/i2c-core-acpi.c | |||
| @@ -445,10 +445,17 @@ static int acpi_gsb_i2c_read_bytes(struct i2c_client *client, | |||
| 445 | msgs[1].buf = buffer; | 445 | msgs[1].buf = buffer; |
| 446 | 446 | ||
| 447 | ret = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs)); | 447 | ret = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs)); |
| 448 | if (ret < 0) | 448 | if (ret < 0) { |
| 449 | dev_err(&client->adapter->dev, "i2c read failed\n"); | 449 | /* Getting a NACK is unfortunately normal with some DSTDs */ |
| 450 | else | 450 | if (ret == -EREMOTEIO) |
| 451 | dev_dbg(&client->adapter->dev, "i2c read %d bytes from client@%#x starting at reg %#x failed, error: %d\n", | ||
| 452 | data_len, client->addr, cmd, ret); | ||
| 453 | else | ||
| 454 | dev_err(&client->adapter->dev, "i2c read %d bytes from client@%#x starting at reg %#x failed, error: %d\n", | ||
| 455 | data_len, client->addr, cmd, ret); | ||
| 456 | } else { | ||
| 451 | memcpy(data, buffer, data_len); | 457 | memcpy(data, buffer, data_len); |
| 458 | } | ||
| 452 | 459 | ||
| 453 | kfree(buffer); | 460 | kfree(buffer); |
| 454 | return ret; | 461 | return ret; |
diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index 1ba40bb2b966..a17f46a95f73 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c | |||
| @@ -363,7 +363,7 @@ static int i2c_device_probe(struct device *dev) | |||
| 363 | goto err_clear_wakeup_irq; | 363 | goto err_clear_wakeup_irq; |
| 364 | 364 | ||
| 365 | status = dev_pm_domain_attach(&client->dev, true); | 365 | status = dev_pm_domain_attach(&client->dev, true); |
| 366 | if (status == -EPROBE_DEFER) | 366 | if (status) |
| 367 | goto err_clear_wakeup_irq; | 367 | goto err_clear_wakeup_irq; |
| 368 | 368 | ||
| 369 | /* | 369 | /* |
