aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/v4l2-common.h
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2007-01-23 20:38:13 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-02-21 10:34:55 -0500
commit52ebc763d8e0c9f2ab48af89a75e90e2318bac86 (patch)
tree5699ff9425fb1da30a18b00661fcea659ace6a72 /include/media/v4l2-common.h
parentdbbff48f39263f7e5c96a55624da87879de2bf71 (diff)
V4L/DVB (5146): Make VIDIOC_INT_[SG]_REGISTER ioctls no longer internal only
The direct register access ioctls were defined as kernel internal only, but they are very useful for debugging hardware from userspace and are used as such. Officially export them. VIDIOC_INT_[SG]_REGISTER is renamed to VIDIOC_DBG_[SG]_REGISTER Definition of ioctl and struct v4l2_register is moved from v4l2-common.h to videodev2.h. Types used in struct v4l2_register are changed to the userspace exportable versions (u32 -> __u32, etc). Use of VIDIOC_DBG_S_REGISTER requires CAP_SYS_ADMIN permission, so move the check into the video_ioctl2() dispatcher so it doesn't need to be duplicated in each driver's call-back function. CAP_SYS_ADMIN check is added to pvrusb2 (which doesn't use video_ioctl2). Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'include/media/v4l2-common.h')
-rw-r--r--include/media/v4l2-common.h11
1 files changed, 1 insertions, 10 deletions
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h
index 91b19921f958..959e6f6a4eff 100644
--- a/include/media/v4l2-common.h
+++ b/include/media/v4l2-common.h
@@ -99,13 +99,6 @@ u32 v4l2_ctrl_next(const u32 * const *ctrl_classes, u32 id);
99 99
100/* Internal ioctls */ 100/* Internal ioctls */
101 101
102/* VIDIOC_INT_G_REGISTER and VIDIOC_INT_S_REGISTER */
103struct v4l2_register {
104 u32 i2c_id; /* I2C driver ID of the I2C chip. 0 for the I2C adapter. */
105 unsigned long reg;
106 u32 val;
107};
108
109/* VIDIOC_INT_DECODE_VBI_LINE */ 102/* VIDIOC_INT_DECODE_VBI_LINE */
110struct v4l2_decode_vbi_line { 103struct v4l2_decode_vbi_line {
111 u32 is_second_field; /* Set to 0 for the first (odd) field, 104 u32 is_second_field; /* Set to 0 for the first (odd) field,
@@ -175,9 +168,7 @@ enum v4l2_chip_ident {
175 Replacement of TUNER_SET_STANDBY. */ 168 Replacement of TUNER_SET_STANDBY. */
176#define VIDIOC_INT_S_STANDBY _IOW('d', 94, u32) 169#define VIDIOC_INT_S_STANDBY _IOW('d', 94, u32)
177 170
178/* only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */ 171/* 100, 101 used by VIDIOC_DBG_[SG]_REGISTER */
179#define VIDIOC_INT_S_REGISTER _IOW ('d', 100, struct v4l2_register)
180#define VIDIOC_INT_G_REGISTER _IOWR('d', 101, struct v4l2_register)
181 172
182/* Generic reset command. The argument selects which subsystems to reset. 173/* Generic reset command. The argument selects which subsystems to reset.
183 Passing 0 will always reset the whole chip. */ 174 Passing 0 will always reset the whole chip. */