From 2be3674b75c83865e9a131c6c54aaee005df47ed Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 24 Feb 2007 01:27:26 +0100 Subject: Add support for VIDIOC_G_CHIP_IDENT From: Hans Verkuil VIDIOC_G_CHIP_IDENT improves debugging of card problems: it can be used to detect which chips are on the board and based on that information selected register dumps can be made, making it easy to debug complicated media chips containing tens or hundreds of registers. This ioctl replaces the internal VIDIOC_INT_G_CHIP_IDENT ioctl. Signed-off-by: Hans Verkuil CC: Jonathan Corbet --- linux/drivers/media/video/videodev.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'linux/drivers/media/video/videodev.c') diff --git a/linux/drivers/media/video/videodev.c b/linux/drivers/media/video/videodev.c index b1cd0bb72..acb3c4fbf 100644 --- a/linux/drivers/media/video/videodev.c +++ b/linux/drivers/media/video/videodev.c @@ -1555,6 +1555,16 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, break; } #endif + case VIDIOC_G_CHIP_IDENT: + { + struct v4l2_chip_ident *p=arg; + if (!vfd->vidioc_g_chip_ident) + break; + ret=vfd->vidioc_g_chip_ident(file, fh, p); + if (!ret) + dbgarg (cmd, "chip_ident=%u, revision=0x%x\n", p->ident, p->revision); + break; + } } /* switch */ if (vfd->debug & V4L2_DEBUG_IOCTL_ARG) { -- cgit v1.2.3