summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tvp5150.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/tvp5150.c')
-rw-r--r--linux/drivers/media/video/tvp5150.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/linux/drivers/media/video/tvp5150.c b/linux/drivers/media/video/tvp5150.c
index b907fbf2b..a758caea2 100644
--- a/linux/drivers/media/video/tvp5150.c
+++ b/linux/drivers/media/video/tvp5150.c
@@ -861,6 +861,30 @@ static int tvp5150_command(struct i2c_client *c,
*(v4l2_std_id *)arg = decoder->norm;
break;
+#ifdef CONFIG_VIDEO_ADV_DEBUG
+ case VIDIOC_INT_G_REGISTER:
+ {
+ struct v4l2_register *reg = arg;
+
+ if (reg->i2c_id != I2C_DRIVERID_TVP5150)
+ return -EINVAL;
+ reg->val = tvp5150_read(c, reg->reg & 0xff);
+ break;
+ }
+
+ case VIDIOC_INT_S_REGISTER:
+ {
+ struct v4l2_register *reg = arg;
+
+ if (reg->i2c_id != I2C_DRIVERID_TVP5150)
+ return -EINVAL;
+ if (!capable(CAP_SYS_ADMIN))
+ return -EPERM;
+ tvp5150_write(c, reg->reg & 0xff, reg->val & 0xff);
+ break;
+ }
+#endif
+
case DECODER_DUMP:
dump_reg(c);
break;