Skip to content

Commit

Permalink
[media] ov2640: select sensor register bank before applying h/v-flip …
Browse files Browse the repository at this point in the history
…settings

We currently don't select the register bank in ov2640_s_ctrl, so we can end up
writing to DSP register 0x04 instead of sensor register 0x04.
This happens for example when calling ov2640_s_ctrl after ov2640_s_fmt.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Frank Schäfer authored and Mauro Carvalho Chehab committed Oct 6, 2012
1 parent ab99cb1 commit a52eb6c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/media/i2c/soc_camera/ov2640.c
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,11 @@ static int ov2640_s_ctrl(struct v4l2_ctrl *ctrl)
&container_of(ctrl->handler, struct ov2640_priv, hdl)->subdev;
struct i2c_client *client = v4l2_get_subdevdata(sd);
u8 val;
int ret;

ret = i2c_smbus_write_byte_data(client, BANK_SEL, BANK_SEL_SENS);
if (ret < 0)
return ret;

switch (ctrl->id) {
case V4L2_CID_VFLIP:
Expand Down

0 comments on commit a52eb6c

Please sign in to comment.