diff options
author | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2006-01-09 17:25:37 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2006-01-09 17:25:37 (GMT) |
commit | 21dcd8ccd76e80118f524b1a730c35ab1c46c09e (patch) | |
tree | 4a08b0416ef74fbeecfb83eb84658c425c625020 /drivers/media/video/tvp5150.c | |
parent | 9bb13a6dc3a6f68c990264838ff0493d900c48d7 (diff) | |
download | linux-21dcd8ccd76e80118f524b1a730c35ab1c46c09e.tar.xz |
V4L/DVB (3234): Included advanced debug option to tvp5150.c
- Included advanced debug option to tvp5150.c
- Now, advanced debug info is the first item at V4L menu.
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'drivers/media/video/tvp5150.c')
-rw-r--r-- | drivers/media/video/tvp5150.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/media/video/tvp5150.c b/drivers/media/video/tvp5150.c index 9ed839d..07ad675 100644 --- a/drivers/media/video/tvp5150.c +++ b/drivers/media/video/tvp5150.c @@ -850,6 +850,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; |