Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173867
b: refs/heads/master
c: 6d1ea0f
h: refs/heads/master
i:
  173865: 45d65d2
  173863: 16fef1d
v: v3
  • Loading branch information
Shinya Kuribayashi authored and Ben Dooks committed Dec 9, 2009
1 parent 1091409 commit 6ff3f35
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a0e06ea64cd2b4b7eee9c196bf623d6c9e44df7c
refs/heads/master: 6d1ea0f6afde6887d6dea2ace1714a23d9b5820d
9 changes: 7 additions & 2 deletions trunk/drivers/i2c/busses/i2c-designware.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,13 +496,18 @@ static int i2c_dw_handle_tx_abort(struct dw_i2c_dev *dev)
unsigned long abort_source = dev->abort_source;
int i;

if (abort_source & DW_IC_TX_ABRT_NOACK) {
for_each_bit(i, &abort_source, ARRAY_SIZE(abort_sources))
dev_dbg(dev->dev,
"%s: %s\n", __func__, abort_sources[i]);
return -EREMOTEIO;
}

for_each_bit(i, &abort_source, ARRAY_SIZE(abort_sources))
dev_err(dev->dev, "%s: %s\n", __func__, abort_sources[i]);

if (abort_source & DW_IC_TX_ARB_LOST)
return -EAGAIN;
else if (abort_source & DW_IC_TX_ABRT_NOACK)
return -EREMOTEIO;
else if (abort_source & DW_IC_TX_ABRT_GCALL_READ)
return -EINVAL; /* wrong msgs[] data */
else
Expand Down

0 comments on commit 6ff3f35

Please sign in to comment.