Commit 5476ea8d authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by Mauro Carvalho Chehab

[media] V4L: tw9910: remove superfluous soc-camera client operations

Now that all soc-camera hosts have been ported to use V4L2 subdevice
mediabus-config operations and soc-camera client bus-parameter operations
have been made optional, they can be removed.
Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 1067247f
...@@ -453,7 +453,7 @@ static const struct tw9910_scale_ctrl *tw9910_select_norm(struct soc_camera_devi ...@@ -453,7 +453,7 @@ static const struct tw9910_scale_ctrl *tw9910_select_norm(struct soc_camera_devi
} }
/* /*
* soc_camera_ops function * subdevice operations
*/ */
static int tw9910_s_stream(struct v4l2_subdev *sd, int enable) static int tw9910_s_stream(struct v4l2_subdev *sd, int enable)
{ {
...@@ -495,44 +495,6 @@ static int tw9910_s_stream(struct v4l2_subdev *sd, int enable) ...@@ -495,44 +495,6 @@ static int tw9910_s_stream(struct v4l2_subdev *sd, int enable)
return tw9910_power(client, enable); return tw9910_power(client, enable);
} }
static int tw9910_set_bus_param(struct soc_camera_device *icd,
unsigned long flags)
{
struct soc_camera_link *icl = to_soc_camera_link(icd);
struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
struct i2c_client *client = v4l2_get_subdevdata(sd);
u8 val = VSSL_VVALID | HSSL_DVALID;
flags = soc_camera_apply_sensor_flags(icl, flags);
/*
* set OUTCTR1
*
* We use VVALID and DVALID signals to control VSYNC and HSYNC
* outputs, in this mode their polarity is inverted.
*/
if (flags & SOCAM_HSYNC_ACTIVE_LOW)
val |= HSP_HI;
if (flags & SOCAM_VSYNC_ACTIVE_LOW)
val |= VSP_HI;
return i2c_smbus_write_byte_data(client, OUTCTR1, val);
}
static unsigned long tw9910_query_bus_param(struct soc_camera_device *icd)
{
struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd));
struct tw9910_priv *priv = to_tw9910(client);
struct soc_camera_link *icl = to_soc_camera_link(icd);
unsigned long flags = SOCAM_PCLK_SAMPLE_RISING | SOCAM_MASTER |
SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_HSYNC_ACTIVE_HIGH |
SOCAM_VSYNC_ACTIVE_LOW | SOCAM_HSYNC_ACTIVE_LOW |
SOCAM_DATA_ACTIVE_HIGH | priv->info->buswidth;
return soc_camera_apply_sensor_flags(icl, flags);
}
static int tw9910_s_std(struct v4l2_subdev *sd, v4l2_std_id norm) static int tw9910_s_std(struct v4l2_subdev *sd, v4l2_std_id norm)
{ {
int ret = -EINVAL; int ret = -EINVAL;
...@@ -840,11 +802,6 @@ static int tw9910_video_probe(struct soc_camera_device *icd, ...@@ -840,11 +802,6 @@ static int tw9910_video_probe(struct soc_camera_device *icd,
return 0; return 0;
} }
static struct soc_camera_ops tw9910_ops = {
.set_bus_param = tw9910_set_bus_param,
.query_bus_param = tw9910_query_bus_param,
};
static struct v4l2_subdev_core_ops tw9910_subdev_core_ops = { static struct v4l2_subdev_core_ops tw9910_subdev_core_ops = {
.g_chip_ident = tw9910_g_chip_ident, .g_chip_ident = tw9910_g_chip_ident,
.s_std = tw9910_s_std, .s_std = tw9910_s_std,
...@@ -964,14 +921,12 @@ static int tw9910_probe(struct i2c_client *client, ...@@ -964,14 +921,12 @@ static int tw9910_probe(struct i2c_client *client,
v4l2_i2c_subdev_init(&priv->subdev, client, &tw9910_subdev_ops); v4l2_i2c_subdev_init(&priv->subdev, client, &tw9910_subdev_ops);
icd->ops = &tw9910_ops; icd->ops = NULL;
icd->iface = icl->bus_id; icd->iface = icl->bus_id;
ret = tw9910_video_probe(icd, client); ret = tw9910_video_probe(icd, client);
if (ret) { if (ret)
icd->ops = NULL;
kfree(priv); kfree(priv);
}
return ret; return ret;
} }
...@@ -979,9 +934,7 @@ static int tw9910_probe(struct i2c_client *client, ...@@ -979,9 +934,7 @@ static int tw9910_probe(struct i2c_client *client,
static int tw9910_remove(struct i2c_client *client) static int tw9910_remove(struct i2c_client *client)
{ {
struct tw9910_priv *priv = to_tw9910(client); struct tw9910_priv *priv = to_tw9910(client);
struct soc_camera_device *icd = client->dev.platform_data;
icd->ops = NULL;
kfree(priv); kfree(priv);
return 0; return 0;
} }
......
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