Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176860
b: refs/heads/master
c: c1d7b06
h: refs/heads/master
v: v3
  • Loading branch information
Kuninori Morimoto authored and Mauro Carvalho Chehab committed Dec 16, 2009
1 parent 9cecb5f commit 3af86cb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 49 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: 7874b9038da3ff54dd1667e6bab307e66030950e
refs/heads/master: c1d7b06cc37af3a958f7573af69ce2d0920ca79d
48 changes: 0 additions & 48 deletions trunk/drivers/media/video/tw9910.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,13 +329,6 @@ static const struct tw9910_scale_ctrl tw9910_pal_scales[] = {
},
};

static const struct tw9910_cropping_ctrl tw9910_cropping_ctrl = {
.vdelay = 0x0012,
.vactive = 0x00F0,
.hdelay = 0x0010,
.hactive = 0x02D0,
};

static const struct tw9910_hsync_ctrl tw9910_hsync_ctrl = {
.start = 0x0260,
.end = 0x0300,
Expand Down Expand Up @@ -385,40 +378,6 @@ static int tw9910_set_scale(struct i2c_client *client,
return ret;
}

static int tw9910_set_cropping(struct i2c_client *client,
const struct tw9910_cropping_ctrl *cropping)
{
int ret;

ret = i2c_smbus_write_byte_data(client, CROP_HI,
(cropping->vdelay & 0x0300) >> 2 |
(cropping->vactive & 0x0300) >> 4 |
(cropping->hdelay & 0x0300) >> 6 |
(cropping->hactive & 0x0300) >> 8);
if (ret < 0)
return ret;

ret = i2c_smbus_write_byte_data(client, VDELAY_LO,
cropping->vdelay & 0x00FF);
if (ret < 0)
return ret;

ret = i2c_smbus_write_byte_data(client, VACTIVE_LO,
cropping->vactive & 0x00FF);
if (ret < 0)
return ret;

ret = i2c_smbus_write_byte_data(client, HDELAY_LO,
cropping->hdelay & 0x00FF);
if (ret < 0)
return ret;

ret = i2c_smbus_write_byte_data(client, HACTIVE_LO,
cropping->hactive & 0x00FF);

return ret;
}

static int tw9910_set_hsync(struct i2c_client *client,
const struct tw9910_hsync_ctrl *hsync)
{
Expand Down Expand Up @@ -708,13 +667,6 @@ static int tw9910_s_crop(struct v4l2_subdev *sd, struct v4l2_crop *a)
if (ret < 0)
goto tw9910_set_fmt_error;

/*
* set cropping
*/
ret = tw9910_set_cropping(client, &tw9910_cropping_ctrl);
if (ret < 0)
goto tw9910_set_fmt_error;

/*
* set hsync
*/
Expand Down

0 comments on commit 3af86cb

Please sign in to comment.