diff options
author | Mike Isely <isely@pobox.com> | 2006-09-23 22:26:52 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-10-03 15:13:34 -0300 |
commit | 32ffa9ae03c529df4208b63b4b17c6d84141faa3 (patch) | |
tree | 55be825b8bb7d1dafdc2fe936d1e5df47d1a1fbe /drivers/media/video/pvrusb2/pvrusb2-v4l2.c | |
parent | 59753950a67edf386413c7b18039b89de56b40fb (diff) | |
download | lwn-32ffa9ae03c529df4208b63b4b17c6d84141faa3.tar.gz lwn-32ffa9ae03c529df4208b63b4b17c6d84141faa3.zip |
V4L/DVB (4662): Pvrusb2: Implement VIDIOC_INT_[G|S]_REGISTER
Implement VIDIOC_INT_SET_REGISTER and VIDIOC_INT_GET_REGISTER for the
pvrusb2 driver. This is a debugging aid which will not be enabled
unless CONFIG_VIDEO_ADV_DEBUG has been enabled.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-v4l2.c')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-v4l2.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c index 3608c2f81df9..156e375c93e9 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c @@ -671,6 +671,20 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file, ret = 0; break; } +#ifdef CONFIG_VIDEO_ADV_DEBUG + case VIDIOC_INT_G_REGISTER: + case VIDIOC_INT_S_REGISTER: + { + u32 val; + struct v4l2_register *req = (struct v4l2_register *)arg; + if (cmd == VIDIOC_INT_S_REGISTER) val = req->val; + ret = pvr2_hdw_register_access( + hdw,req->i2c_id,req->reg, + cmd == VIDIOC_INT_S_REGISTER,&val); + if (cmd == 0) req->val = val; + break; + } +#endif default : ret = v4l_compat_translate_ioctl(inode,file,cmd, |