Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 17332
b: refs/heads/master
c: 21dcd8c
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Jan 9, 2006
1 parent c2b675d commit 34285a5
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9bb13a6dc3a6f68c990264838ff0493d900c48d7
refs/heads/master: 21dcd8ccd76e80118f524b1a730c35ab1c46c09e
16 changes: 9 additions & 7 deletions trunk/drivers/media/video/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ menu "Video For Linux"

comment "Video Adapters"

config VIDEO_ADV_DEBUG
bool "Enable advanced debug functionality"
depends on VIDEO_DEV
default n
---help---
Say Y here to enable advanced debugging functionality on some
V4L devices.
In doubt, say N.

config VIDEO_BT848
tristate "BT848 Video For Linux"
depends on VIDEO_DEV && PCI && I2C
Expand Down Expand Up @@ -344,11 +353,4 @@ config VIDEO_DECODER
Say Y here to compile drivers for SAA7115, SAA7127 and CX25840
video decoders.

config VIDEO_ADV_DEBUG
bool "Enable advanced debug functionality"
depends on VIDEO_DEV && VIDEO_DECODER && EXPERIMENTAL
---help---
Say Y here to enable advanced debugging functionality in the
SAA7115, SAA7127 and CX25840 video decoders.

endmenu
24 changes: 24 additions & 0 deletions trunk/drivers/media/video/tvp5150.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/i2c-id.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
#define I2C_DRIVERID_SAA711X 73 /* saa711x video encoders */
#define I2C_DRIVERID_AKITAIOEXP 74 /* IO Expander on Sharp SL-C1000 */
#define I2C_DRIVERID_INFRARED 75 /* I2C InfraRed on Video boards */
#define I2C_DRIVERID_TVP5150 76 /* TVP5150 video decoder */

#define I2C_DRIVERID_I2CDEV 900
#define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */
Expand Down

0 comments on commit 34285a5

Please sign in to comment.