summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/drivers/media/video/cx88/cx88-video.c24
-rwxr-xr-xv4l/scripts/check_config_defines.pl4
2 files changed, 26 insertions, 2 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c
index 9782a3799..1f1640f0f 100644
--- a/linux/drivers/media/video/cx88/cx88-video.c
+++ b/linux/drivers/media/video/cx88/cx88-video.c
@@ -1779,6 +1779,30 @@ int cx88_do_ioctl(struct inode *inode, struct file *file, int radio,
mutex_unlock(&core->lock);
return 0;
}
+#ifdef CONFIG_VIDEO_ADV_DEBUG
+ /* ioctls to allow direct acces to the cx2388x registers */
+ case VIDIOC_INT_G_REGISTER:
+ {
+ struct v4l2_register *reg = arg;
+
+ if (reg->i2c_id != 0)
+ return -EINVAL;
+ /* cx2388x has a 24-bit register space */
+ reg->val = cx_read(reg->reg&0xffffff);
+ return 0;
+ }
+ case VIDIOC_INT_S_REGISTER:
+ {
+ struct v4l2_register *reg = arg;
+
+ if (reg->i2c_id != 0)
+ return -EINVAL;
+ if (!capable(CAP_SYS_ADMIN))
+ return -EPERM;
+ cx_write(reg->reg&0xffffff, reg->val);
+ return 0;
+ }
+#endif
default:
return v4l_compat_translate_ioctl(inode,file,cmd,arg,
diff --git a/v4l/scripts/check_config_defines.pl b/v4l/scripts/check_config_defines.pl
index 91643d23c..6d0256dcf 100755
--- a/v4l/scripts/check_config_defines.pl
+++ b/v4l/scripts/check_config_defines.pl
@@ -12,8 +12,8 @@ if($#ARGV < 0) {
$kdir = shift;
if($#ARGV < 0) {
- @ARGV = `hg manifest | cut "-d " -f3 | grep '.[ch]\$'`;
- $? == 0 and die "Error getting manifest: $!";
+ @ARGV = `hg manifest | cut "-d " -f3 | grep \\.[ch]\$`;
+ $? != 0 and die "Error getting manifest: $!";
chomp @ARGV;
}