X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=drivers%2Fmedia%2Fvideo%2Fov5642.c;h=163a6f7ff8ef7a5673990f74ce788a5cf0600eab;hp=349a4ad3ccc157488c91ce36626f9089e4fda758;hb=0934d94a52423fac35922c2e29d72a43db7ddd48;hpb=0b576372e86c8e6bee01506651b21ec0fe8a1698 diff --git a/drivers/media/video/ov5642.c b/drivers/media/video/ov5642.c index 349a4ad3ccc1..163a6f7ff8ef 100644 --- a/drivers/media/video/ov5642.c +++ b/drivers/media/video/ov5642.c @@ -855,6 +855,17 @@ static int ov5642_cropcap(struct v4l2_subdev *sd, struct v4l2_cropcap *a) return 0; } +static int ov5642_g_mbus_config(struct v4l2_subdev *sd, + struct v4l2_mbus_config *cfg) +{ + cfg->type = V4L2_MBUS_CSI2; + cfg->flags = V4L2_MBUS_CSI2_2_LANE | + V4L2_MBUS_CSI2_CHANNEL_0 | + V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; + + return 0; +} + static struct v4l2_subdev_video_ops ov5642_subdev_video_ops = { .s_mbus_fmt = ov5642_s_fmt, .g_mbus_fmt = ov5642_g_fmt, @@ -862,6 +873,7 @@ static struct v4l2_subdev_video_ops ov5642_subdev_video_ops = { .enum_mbus_fmt = ov5642_enum_fmt, .g_crop = ov5642_g_crop, .cropcap = ov5642_cropcap, + .g_mbus_config = ov5642_g_mbus_config, }; static struct v4l2_subdev_core_ops ov5642_subdev_core_ops = { @@ -877,26 +889,6 @@ static struct v4l2_subdev_ops ov5642_subdev_ops = { .video = &ov5642_subdev_video_ops, }; -/* - * We have to provide soc-camera operations, but we don't have anything to say - * there. The MIPI CSI2 driver will provide .query_bus_param and .set_bus_param - */ -static unsigned long soc_ov5642_query_bus_param(struct soc_camera_device *icd) -{ - return 0; -} - -static int soc_ov5642_set_bus_param(struct soc_camera_device *icd, - unsigned long flags) -{ - return -EINVAL; -} - -static struct soc_camera_ops soc_ov5642_ops = { - .query_bus_param = soc_ov5642_query_bus_param, - .set_bus_param = soc_ov5642_set_bus_param, -}; - static int ov5642_video_probe(struct soc_camera_device *icd, struct i2c_client *client) { @@ -950,7 +942,6 @@ static int ov5642_probe(struct i2c_client *client, v4l2_i2c_subdev_init(&priv->subdev, client, &ov5642_subdev_ops); - icd->ops = &soc_ov5642_ops; priv->fmt = &ov5642_colour_fmts[0]; ret = ov5642_video_probe(icd, client); @@ -960,7 +951,6 @@ static int ov5642_probe(struct i2c_client *client, return 0; error: - icd->ops = NULL; kfree(priv); return ret; } @@ -971,7 +961,6 @@ static int ov5642_remove(struct i2c_client *client) struct soc_camera_device *icd = client->dev.platform_data; struct soc_camera_link *icl = to_soc_camera_link(icd); - icd->ops = NULL; if (icl->free_bus) icl->free_bus(icl); kfree(priv);