Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 366824
b: refs/heads/master
c: 8dbee53
h: refs/heads/master
v: v3
  • Loading branch information
Volokh Konstantin authored and Mauro Carvalho Chehab committed Mar 25, 2013
1 parent cc89d23 commit 51a7b78
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 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: 136d9f3a41bc528773430f2723cf27963bbd6fbc
refs/heads/master: 8dbee53b2a8dcc23e8d52d85d7e0b4fe268c55e7
17 changes: 1 addition & 16 deletions trunk/drivers/media/i2c/tw2804.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static const u8 global_registers[] = {
0x3d, 0x80,
0x3e, 0x82,
0x3f, 0x82,
0x78, 0x0f,
0x78, 0x00,
0xff, 0xff, /* Terminator (reg 0xff does not exist) */
};

Expand Down Expand Up @@ -337,28 +337,13 @@ static int tw2804_s_video_routing(struct v4l2_subdev *sd, u32 input, u32 output,
return 0;
}

static int tw2804_s_stream(struct v4l2_subdev *sd, int enable)
{
struct tw2804 *dec = to_state(sd);
struct i2c_client *client = v4l2_get_subdevdata(sd);
u32 reg = read_reg(client, 0x78, 0);

if (enable == 1)
write_reg(client, 0x78, reg & ~(1 << dec->channel), 0);
else
write_reg(client, 0x78, reg | (1 << dec->channel), 0);

return 0;
}

static const struct v4l2_ctrl_ops tw2804_ctrl_ops = {
.g_volatile_ctrl = tw2804_g_volatile_ctrl,
.s_ctrl = tw2804_s_ctrl,
};

static const struct v4l2_subdev_video_ops tw2804_video_ops = {
.s_routing = tw2804_s_video_routing,
.s_stream = tw2804_s_stream,
};

static const struct v4l2_subdev_core_ops tw2804_core_ops = {
Expand Down

0 comments on commit 51a7b78

Please sign in to comment.