Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 53261
b: refs/heads/master
c: 7d05481
h: refs/heads/master
i:
  53259: 5df7554
v: v3
  • Loading branch information
Jean Delvare authored and Jean Delvare committed May 1, 2007
1 parent 73a9ab9 commit 5606039
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 494dbb64dc5b369cc28542f4c4d634e57b0d7f18
refs/heads/master: 7d054817b780e664bed6701b2aa637718e1905b7
13 changes: 13 additions & 0 deletions trunk/drivers/i2c/busses/i2c-pxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,18 @@ static inline void i2c_pxa_start_message(struct pxa_i2c *i2c)
writel(icr | ICR_START | ICR_TB, _ICR(i2c));
}

static inline void i2c_pxa_stop_message(struct pxa_i2c *i2c)
{
u32 icr;

/*
* Clear the STOP and ACK flags
*/
icr = readl(_ICR(i2c));
icr &= ~(ICR_STOP | ICR_ACKNAK);
writel(icr, _IRC(i2c));
}

/*
* We are protected by the adapter bus mutex.
*/
Expand Down Expand Up @@ -581,6 +593,7 @@ static int i2c_pxa_do_xfer(struct pxa_i2c *i2c, struct i2c_msg *msg, int num)
* The rest of the processing occurs in the interrupt handler.
*/
timeout = wait_event_timeout(i2c->wait, i2c->msg_num == 0, HZ * 5);
i2c_pxa_stop_message(i2c);

/*
* We place the return code in i2c->msg_idx.
Expand Down

0 comments on commit 5606039

Please sign in to comment.