aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx23885/cx23885-417.c
diff options
context:
space:
mode:
authorAndy Walls <awalls@radix.net>2009-09-26 21:50:44 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-05 15:40:16 -0500
commit74618244003a5a9e11240af8c5795ae747d9a2e0 (patch)
tree20021195d0e5b841808e4e5dfb6b1d40c16f3f9e /drivers/media/video/cx23885/cx23885-417.c
parentf56db93cef5d368b4fa5db49b68bc4ab0b20c4fd (diff)
V4L/DVB (13085): cx23885: Fix support for v4l2-dbg access to CX2388[578] and CX23417 regs
This changes corrects the ioctl() operations for both the CX2388[578] analog video and MPEG video device nodes to properly and consistently support VIDIOC_G_CHIP_IDENT, VIDIOC_DBG_G_REGISTER and VIDIOC_DBG_S_REGISTER ioctl()s. This caused some ioctl() support routines to be broken out into a separate source file. Now v4l2-dbg can be used to manipulate CX2388[578] and CX23417 registers including the CX2388[57] functions handled by the cx25840 module. This was done in anticipation of developing a new v4l2_subdev for the integrated IR controller of the CX23888. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx23885/cx23885-417.c')
-rw-r--r--drivers/media/video/cx23885/cx23885-417.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/media/video/cx23885/cx23885-417.c b/drivers/media/video/cx23885/cx23885-417.c
index 6c3b51ce3372..0eed852c61e9 100644
--- a/drivers/media/video/cx23885/cx23885-417.c
+++ b/drivers/media/video/cx23885/cx23885-417.c
@@ -37,6 +37,7 @@
37#include <media/cx2341x.h> 37#include <media/cx2341x.h>
38 38
39#include "cx23885.h" 39#include "cx23885.h"
40#include "cx23885-ioctl.h"
40 41
41#define CX23885_FIRM_IMAGE_SIZE 376836 42#define CX23885_FIRM_IMAGE_SIZE 376836
42#define CX23885_FIRM_IMAGE_NAME "v4l-cx23885-enc.fw" 43#define CX23885_FIRM_IMAGE_NAME "v4l-cx23885-enc.fw"
@@ -318,7 +319,7 @@ static int mc417_wait_ready(struct cx23885_dev *dev)
318 } 319 }
319} 320}
320 321
321static int mc417_register_write(struct cx23885_dev *dev, u16 address, u32 value) 322int mc417_register_write(struct cx23885_dev *dev, u16 address, u32 value)
322{ 323{
323 u32 regval; 324 u32 regval;
324 325
@@ -382,7 +383,7 @@ static int mc417_register_write(struct cx23885_dev *dev, u16 address, u32 value)
382 return mc417_wait_ready(dev); 383 return mc417_wait_ready(dev);
383} 384}
384 385
385static int mc417_register_read(struct cx23885_dev *dev, u16 address, u32 *value) 386int mc417_register_read(struct cx23885_dev *dev, u16 address, u32 *value)
386{ 387{
387 int retval; 388 int retval;
388 u32 regval; 389 u32 regval;
@@ -1724,6 +1725,11 @@ static const struct v4l2_ioctl_ops mpeg_ioctl_ops = {
1724 .vidioc_log_status = vidioc_log_status, 1725 .vidioc_log_status = vidioc_log_status,
1725 .vidioc_querymenu = vidioc_querymenu, 1726 .vidioc_querymenu = vidioc_querymenu,
1726 .vidioc_queryctrl = vidioc_queryctrl, 1727 .vidioc_queryctrl = vidioc_queryctrl,
1728 .vidioc_g_chip_ident = cx23885_g_chip_ident,
1729#ifdef CONFIG_VIDEO_ADV_DEBUG
1730 .vidioc_g_register = cx23885_g_register,
1731 .vidioc_s_register = cx23885_s_register,
1732#endif
1727}; 1733};
1728 1734
1729static struct video_device cx23885_mpeg_template = { 1735static struct video_device cx23885_mpeg_template = {