提交 a32f790c 编写于 作者: D Dave Stevenson 提交者: Zheng Zengkai

media: i2c: ov5647: Neither analogue gain nor exposure need EXECUTE_ON_WRITE

raspberrypi inclusion
category: feature
bugzilla: 50432

--------------------------------

The controls for analogue gain and exposure were defined with
V4L2_CTRL_FLAG_EXECUTE_ON_WRITE. This is not required as we only need
to send changes to the sensor.
Signed-off-by: NDave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: NFang Yafen <yafen@iscas.ac.cn>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 d1181161
...@@ -1472,7 +1472,6 @@ static int ov5647_probe(struct i2c_client *client) ...@@ -1472,7 +1472,6 @@ static int ov5647_probe(struct i2c_client *client)
struct v4l2_subdev *sd; struct v4l2_subdev *sd;
struct device_node *np = client->dev.of_node; struct device_node *np = client->dev.of_node;
u32 xclk_freq; u32 xclk_freq;
struct v4l2_ctrl *ctrl;
int hblank; int hblank;
sensor = devm_kzalloc(dev, sizeof(*sensor), GFP_KERNEL); sensor = devm_kzalloc(dev, sizeof(*sensor), GFP_KERNEL);
...@@ -1525,20 +1524,18 @@ static int ov5647_probe(struct i2c_client *client) ...@@ -1525,20 +1524,18 @@ static int ov5647_probe(struct i2c_client *client)
V4L2_EXPOSURE_MANUAL, /* max */ V4L2_EXPOSURE_MANUAL, /* max */
0, /* skip_mask */ 0, /* skip_mask */
V4L2_EXPOSURE_MANUAL); /* default */ V4L2_EXPOSURE_MANUAL); /* default */
ctrl = v4l2_ctrl_new_std(&sensor->ctrls, &ov5647_ctrl_ops, v4l2_ctrl_new_std(&sensor->ctrls, &ov5647_ctrl_ops,
V4L2_CID_EXPOSURE, V4L2_CID_EXPOSURE,
4, /* min lines */ 4, /* min lines */
65535, /* max lines (4+8+4 bits)*/ 65535, /* max lines (4+8+4 bits)*/
1, /* step */ 1, /* step */
1000); /* default number of lines */ 1000); /* default number of lines */
ctrl->flags |= V4L2_CTRL_FLAG_EXECUTE_ON_WRITE; v4l2_ctrl_new_std(&sensor->ctrls, &ov5647_ctrl_ops,
ctrl = v4l2_ctrl_new_std(&sensor->ctrls, &ov5647_ctrl_ops, V4L2_CID_ANALOGUE_GAIN,
V4L2_CID_ANALOGUE_GAIN, 16, /* min, 16 = 1.0x */
16, /* min, 16 = 1.0x */ 1023, /* max (10 bits) */
1023, /* max (10 bits) */ 1, /* step */
1, /* step */ 32); /* default, 32 = 2.0x */
32); /* default, 32 = 2.0x */
ctrl->flags |= V4L2_CTRL_FLAG_EXECUTE_ON_WRITE;
/* Set the default mode before we init the subdev */ /* Set the default mode before we init the subdev */
sensor->mode = OV5647_DEFAULT_MODE; sensor->mode = OV5647_DEFAULT_MODE;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册