Commit a52eb6c0 authored by Frank Schäfer's avatar Frank Schäfer Committed by Mauro Carvalho Chehab

[media] ov2640: select sensor register bank before applying h/v-flip 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: default avatarFrank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent ab99cb18
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment