summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/vpx3220.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/vpx3220.c')
-rw-r--r--linux/drivers/media/video/vpx3220.c33
1 files changed, 15 insertions, 18 deletions
diff --git a/linux/drivers/media/video/vpx3220.c b/linux/drivers/media/video/vpx3220.c
index 0c1c97f2f..ad141a1f8 100644
--- a/linux/drivers/media/video/vpx3220.c
+++ b/linux/drivers/media/video/vpx3220.c
@@ -38,7 +38,7 @@ static int debug;
module_param(debug, int, 0);
MODULE_PARM_DESC(debug, "Debug level (0-1)");
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
static unsigned short normal_i2c[] = { 0x86 >> 1, 0x8e >> 1, I2C_CLIENT_END };
I2C_CLIENT_INSMOD;
@@ -316,8 +316,6 @@ static int vpx3220_status(struct v4l2_subdev *sd, u32 *pstatus, v4l2_std_id *pst
int res = V4L2_IN_ST_NO_SIGNAL, status;
v4l2_std_id std = 0;
- v4l2_dbg(1, debug, sd, "VIDIOC_QUERYSTD/VIDIOC_INT_G_INPUT_STATUS\n");
-
status = vpx3220_fp_read(sd, 0x0f3);
v4l2_dbg(1, debug, sd, "status: 0x%04x\n", status);
@@ -356,11 +354,13 @@ static int vpx3220_status(struct v4l2_subdev *sd, u32 *pstatus, v4l2_std_id *pst
static int vpx3220_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
{
+ v4l2_dbg(1, debug, sd, "querystd\n");
return vpx3220_status(sd, NULL, std);
}
static int vpx3220_g_input_status(struct v4l2_subdev *sd, u32 *status)
{
+ v4l2_dbg(1, debug, sd, "g_input_status\n");
return vpx3220_status(sd, status, NULL);
}
@@ -374,7 +374,7 @@ static int vpx3220_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
choosen video norm */
temp_input = vpx3220_fp_read(sd, 0xf2);
- v4l2_dbg(1, debug, sd, "VIDIOC_S_STD %llx\n", std);
+ v4l2_dbg(1, debug, sd, "s_std %llx\n", (unsigned long long)std);
if (std & V4L2_STD_NTSC) {
vpx3220_write_fp_block(sd, init_ntsc, sizeof(init_ntsc) >> 1);
v4l2_dbg(1, debug, sd, "norm switched to NTSC\n");
@@ -396,33 +396,34 @@ static int vpx3220_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
return 0;
}
-static int vpx3220_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route)
+static int vpx3220_s_routing(struct v4l2_subdev *sd,
+ u32 input, u32 output, u32 config)
{
int data;
- /* RJ: route->input = 0: ST8 (PCTV) input
- route->input = 1: COMPOSITE input
- route->input = 2: SVHS input */
+ /* RJ: input = 0: ST8 (PCTV) input
+ input = 1: COMPOSITE input
+ input = 2: SVHS input */
- const int input[3][2] = {
+ const int input_vals[3][2] = {
{0x0c, 0},
{0x0d, 0},
{0x0e, 1}
};
- if (route->input < 0 || route->input > 2)
+ if (input < 0 || input > 2)
return -EINVAL;
- v4l2_dbg(1, debug, sd, "input switched to %s\n", inputs[route->input]);
+ v4l2_dbg(1, debug, sd, "input switched to %s\n", inputs[input]);
- vpx3220_write(sd, 0x33, input[route->input][0]);
+ vpx3220_write(sd, 0x33, input_vals[input][0]);
data = vpx3220_fp_read(sd, 0xf2) & ~(0x0020);
if (data < 0)
return data;
/* 0x0010 is required to latch the setting */
vpx3220_fp_write(sd, 0xf2,
- data | (input[route->input][1] << 5) | 0x0010);
+ data | (input_vals[input][1] << 5) | 0x0010);
udelay(10);
return 0;
@@ -430,7 +431,7 @@ static int vpx3220_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *
static int vpx3220_s_stream(struct v4l2_subdev *sd, int enable)
{
- v4l2_dbg(1, debug, sd, "VIDIOC_STREAM%s\n", enable ? "ON" : "OFF");
+ v4l2_dbg(1, debug, sd, "s_stream %s\n", enable ? "on" : "off");
vpx3220_write(sd, 0xf2, (enable ? 0x1b : 0x00));
return 0;
@@ -536,9 +537,6 @@ static const struct v4l2_subdev_core_ops vpx3220_core_ops = {
.g_ctrl = vpx3220_g_ctrl,
.s_ctrl = vpx3220_s_ctrl,
.queryctrl = vpx3220_queryctrl,
-};
-
-static const struct v4l2_subdev_tuner_ops vpx3220_tuner_ops = {
.s_std = vpx3220_s_std,
};
@@ -551,7 +549,6 @@ static const struct v4l2_subdev_video_ops vpx3220_video_ops = {
static const struct v4l2_subdev_ops vpx3220_ops = {
.core = &vpx3220_core_ops,
- .tuner = &vpx3220_tuner_ops,
.video = &vpx3220_video_ops,
};