Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 261511
b: refs/heads/master
c: bbc70e6
h: refs/heads/master
i:
  261509: f739e28
  261507: eabd93c
  261503: 884d53e
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Jul 27, 2011
1 parent 8346ae3 commit 691cc0b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 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: e4f4f8758b4c3702761e46f24ee99e34823a0f28
refs/heads/master: bbc70e647b04dc3df1c879089a4f6b633c1952c9
11 changes: 10 additions & 1 deletion trunk/drivers/media/video/em28xx/em28xx-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,16 +181,25 @@ static int em2800_i2c_recv_bytes(struct em28xx *dev, unsigned char addr,

/*
* em28xx_i2c_send_bytes()
* untested for more than 4 bytes
*/
static int em28xx_i2c_send_bytes(void *data, unsigned char addr, char *buf,
short len, int stop)
{
int wrcount = 0;
struct em28xx *dev = (struct em28xx *)data;
int write_timeout, ret;

wrcount = dev->em28xx_write_regs_req(dev, stop ? 2 : 3, addr, buf, len);

/* Seems to be required after a write */
for (write_timeout = EM2800_I2C_WRITE_TIMEOUT; write_timeout > 0;
write_timeout -= 5) {
ret = dev->em28xx_read_reg(dev, 0x05);
if (!ret)
break;
msleep(5);
}

return wrcount;
}

Expand Down

0 comments on commit 691cc0b

Please sign in to comment.