aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7127.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2007-04-27 11:31:08 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-04-27 14:43:27 -0400
commit3434eb7e14d9587ee56f3462bcfa5726b62dadb9 (patch)
tree49afb0915dac8e7864f89582ddbb7a6453982e2c /drivers/media/video/saa7127.c
parentced80c67cd1ed503c6fb72f02ac7342ab4ebf67a (diff)
V4L/DVB (5306): Add support for VIDIOC_G_CHIP_IDENT
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 <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/saa7127.c')
-rw-r--r--drivers/media/video/saa7127.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/video/saa7127.c b/drivers/media/video/saa7127.c
index 50dbb76d4a7f..9f986930490f 100644
--- a/drivers/media/video/saa7127.c
+++ b/drivers/media/video/saa7127.c
@@ -54,6 +54,7 @@
54#include <linux/i2c.h> 54#include <linux/i2c.h>
55#include <linux/videodev2.h> 55#include <linux/videodev2.h>
56#include <media/v4l2-common.h> 56#include <media/v4l2-common.h>
57#include <media/v4l2-chip-ident.h>
57#include <media/saa7127.h> 58#include <media/saa7127.h>
58 59
59static int debug = 0; 60static int debug = 0;
@@ -234,7 +235,7 @@ static struct i2c_reg_value saa7127_init_config_50hz[] = {
234 235
235struct saa7127_state { 236struct saa7127_state {
236 v4l2_std_id std; 237 v4l2_std_id std;
237 enum v4l2_chip_ident ident; 238 u32 ident;
238 enum saa7127_input_type input_type; 239 enum saa7127_input_type input_type;
239 enum saa7127_output_type output_type; 240 enum saa7127_output_type output_type;
240 int video_enable; 241 int video_enable;
@@ -650,9 +651,8 @@ static int saa7127_command(struct i2c_client *client,
650 break; 651 break;
651 } 652 }
652 653
653 case VIDIOC_INT_G_CHIP_IDENT: 654 case VIDIOC_G_CHIP_IDENT:
654 *(enum v4l2_chip_ident *)arg = state->ident; 655 return v4l2_chip_ident_i2c_client(client, arg, state->ident, 0);
655 break;
656 656
657 default: 657 default:
658 return -EINVAL; 658 return -EINVAL;