Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 331157
b: refs/heads/master
c: 1215af4
h: refs/heads/master
i:
  331155: 6e88876
v: v3
  • Loading branch information
Shubhrajyoti D authored and Mauro Carvalho Chehab committed Sep 27, 2012
1 parent ff458cb commit e581a03
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 7 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: 66ba9590c97abd69ea1340b90946363a6b1d33c3
refs/heads/master: 1215af48366ff1e2401a0afcedfd3dcdff5f13fd
40 changes: 34 additions & 6 deletions trunk/drivers/media/i2c/msp3400-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,31 @@ int msp_reset(struct i2c_client *client)
static u8 write[3] = { I2C_MSP_DSP + 1, 0x00, 0x1e };
u8 read[2];
struct i2c_msg reset[2] = {
{ client->addr, I2C_M_IGNORE_NAK, 3, reset_off },
{ client->addr, I2C_M_IGNORE_NAK, 3, reset_on },
{
.addr = client->addr,
.flags = I2C_M_IGNORE_NAK,
.len = 3,
.buf = reset_off
},
{
.addr = client->addr,
.flags = I2C_M_IGNORE_NAK,
.len = 3,
.buf = reset_on
},
};
struct i2c_msg test[2] = {
{ client->addr, 0, 3, write },
{ client->addr, I2C_M_RD, 2, read },
{
.addr = client->addr,
.len = 3,
.buf = write
},
{
.addr = client->addr,
.flags = I2C_M_RD,
.len = 2,
.buf = read
},
};

v4l_dbg(3, msp_debug, client, "msp_reset\n");
Expand All @@ -143,8 +162,17 @@ static int msp_read(struct i2c_client *client, int dev, int addr)
u8 write[3];
u8 read[2];
struct i2c_msg msgs[2] = {
{ client->addr, 0, 3, write },
{ client->addr, I2C_M_RD, 2, read }
{
.addr = client->addr,
.len = 3,
.buf = write
},
{
.addr = client->addr,
.flags = I2C_M_RD,
.len = 2,
.buf = read
}
};

write[0] = dev + 1;
Expand Down

0 comments on commit e581a03

Please sign in to comment.