Commit 36a14185 authored by Hans de Goede's avatar Hans de Goede Committed by Mauro Carvalho Chehab

media: atomisp: ov2722: Remove power on sensor from set_fmt() callback

The atomisp driver now properly ensures s_power(1) is called before calling
the set_fmt() callback, so this workaround is no longer necessary.
Reviewed-by: default avatarAndy Shevchenko <andy@kernel.org>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent e03a5d3e
......@@ -528,9 +528,6 @@ static int power_up(struct v4l2_subdev *sd)
return -ENODEV;
}
if (dev->power_on == 1)
return 0; /* Already on */
/* power control */
ret = power_ctrl(sd, 1);
if (ret)
......@@ -555,7 +552,6 @@ static int power_up(struct v4l2_subdev *sd)
/* according to DS, 20ms is needed between PWDN and i2c access */
msleep(20);
dev->power_on = 1;
return 0;
fail_clk:
......@@ -579,9 +575,6 @@ static int power_down(struct v4l2_subdev *sd)
return -ENODEV;
}
if (dev->power_on == 0)
return 0; /* Already off */
ret = dev->platform_data->flisclk_ctrl(sd, 0);
if (ret)
dev_err(&client->dev, "flisclk failed\n");
......@@ -599,7 +592,6 @@ static int power_down(struct v4l2_subdev *sd)
if (ret)
dev_err(&client->dev, "vprog failed.\n");
dev->power_on = 0;
return ret;
}
......@@ -677,9 +669,6 @@ static int ov2722_set_fmt(struct v4l2_subdev *sd,
mutex_lock(&dev->input_lock);
/* s_power has not been called yet for std v4l2 clients (camorama) */
power_up(sd);
dev->pixels_per_line = dev->res->pixels_per_line;
dev->lines_per_frame = dev->res->lines_per_frame;
......@@ -978,7 +967,6 @@ static int ov2722_probe(struct i2c_client *client)
return -ENOMEM;
mutex_init(&dev->input_lock);
dev->power_on = -1;
dev->res = &ov2722_res_preview[0];
v4l2_i2c_subdev_init(&dev->sd, client, &ov2722_ops);
......
......@@ -198,7 +198,6 @@ struct ov2722_device {
struct ov2722_resolution *res;
struct camera_sensor_platform_data *platform_data;
int power_on;
u16 pixels_per_line;
u16 lines_per_frame;
u8 type;
......
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