aboutsummaryrefslogtreecommitdiff
path: root/include/media/v4l2-int-device.h
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@nokia.com>2007-08-30 09:20:38 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-09 22:14:39 -0300
commit098c645e39e10dc580763b5ea4bd4fb390013474 (patch)
tree25013ceabf3fef962621300495eb379b70efcd1e /include/media/v4l2-int-device.h
parent588005e1008f2cea61b7a1ae2a86c531e99b8c9c (diff)
V4L/DVB (6216): V4L: Int if: add vidioc_int_g_ifparm, other updates
vidioc_int_g_ifparm can be used to obtain hardware-specific information about the interface used by the slave. Rearrange v4l2-int-device.h as well. Also remove useless & characters. Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'include/media/v4l2-int-device.h')
-rw-r--r--include/media/v4l2-int-device.h130
1 files changed, 78 insertions, 52 deletions
diff --git a/include/media/v4l2-int-device.h b/include/media/v4l2-int-device.h
index deb28ce6685..861978deb3b 100644
--- a/include/media/v4l2-int-device.h
+++ b/include/media/v4l2-int-device.h
@@ -30,11 +30,84 @@
#define V4L2NAMESIZE 32
+/*
+ *
+ * The internal V4L2 device interface core.
+ *
+ */
+
enum v4l2_int_type {
v4l2_int_type_master = 1,
v4l2_int_type_slave
};
+struct v4l2_int_device;
+
+struct v4l2_int_master {
+ int (*attach)(struct v4l2_int_device *master,
+ struct v4l2_int_device *slave);
+ void (*detach)(struct v4l2_int_device *master);
+};
+
+typedef int (v4l2_int_ioctl_func)(struct v4l2_int_device *);
+typedef int (v4l2_int_ioctl_func_0)(struct v4l2_int_device *);
+typedef int (v4l2_int_ioctl_func_1)(struct v4l2_int_device *, void *);
+
+struct v4l2_int_ioctl_desc {
+ int num;
+ v4l2_int_ioctl_func *func;
+};
+
+struct v4l2_int_slave {
+ /* Don't touch master. */
+ struct v4l2_int_device *master;
+
+ char attach_to[V4L2NAMESIZE];
+
+ int num_ioctls;
+ struct v4l2_int_ioctl_desc *ioctls;
+};
+
+struct v4l2_int_device {
+ /* Don't touch head. */
+ struct list_head head;
+
+ struct module *module;
+
+ char name[V4L2NAMESIZE];
+
+ enum v4l2_int_type type;
+ union {
+ struct v4l2_int_master *master;
+ struct v4l2_int_slave *slave;
+ } u;
+
+ void *priv;
+};
+
+int v4l2_int_device_register(struct v4l2_int_device *d);
+void v4l2_int_device_unregister(struct v4l2_int_device *d);
+
+int v4l2_int_ioctl_0(struct v4l2_int_device *d, int cmd);
+int v4l2_int_ioctl_1(struct v4l2_int_device *d, int cmd, void *arg);
+
+/*
+ *
+ * Types and definitions for IOCTL commands.
+ *
+ */
+
+/* Slave interface type. */
+enum v4l2_if_type {
+};
+
+struct v4l2_ifparm {
+ enum v4l2_if_type if_type;
+ union {
+ } u;
+};
+
+/* IOCTL command numbers. */
enum v4l2_int_ioctl_num {
/*
*
@@ -62,10 +135,12 @@ enum v4l2_int_ioctl_num {
vidioc_int_dev_exit_num,
/* Set device power state: 0 is off, non-zero is on. */
vidioc_int_s_power_num,
- /* Get parallel interface clock speed for current settings. */
+ /* Get slave interface parameters. */
+ vidioc_int_g_ifparm_num,
+ /* Get external clock speed for current slave settings. */
vidioc_int_g_ext_clk_num,
/*
- * Tell what the parallel interface clock speed actually is.
+ * Tell what the generated interface clock speed actually is.
*/
vidioc_int_s_ext_clk_num,
/* Does the slave need to be reset after VIDIOC_DQBUF? */
@@ -91,56 +166,6 @@ enum v4l2_int_ioctl_num {
vidioc_int_priv_start_num = 2000,
};
-struct v4l2_int_device;
-
-struct v4l2_int_master {
- int (*attach)(struct v4l2_int_device *master,
- struct v4l2_int_device *slave);
- void (*detach)(struct v4l2_int_device *master);
-};
-
-typedef int (v4l2_int_ioctl_func)(struct v4l2_int_device *);
-typedef int (v4l2_int_ioctl_func_0)(struct v4l2_int_device *);
-typedef int (v4l2_int_ioctl_func_1)(struct v4l2_int_device *, void *);
-
-struct v4l2_int_ioctl_desc {
- int num;
- v4l2_int_ioctl_func *func;
-};
-
-struct v4l2_int_slave {
- /* Don't touch master. */
- struct v4l2_int_device *master;
-
- char attach_to[V4L2NAMESIZE];
-
- int num_ioctls;
- struct v4l2_int_ioctl_desc *ioctls;
-};
-
-struct v4l2_int_device {
- /* Don't touch head. */
- struct list_head head;
-
- struct module *module;
-
- char name[V4L2NAMESIZE];
-
- enum v4l2_int_type type;
- union {
- struct v4l2_int_master *master;
- struct v4l2_int_slave *slave;
- } u;
-
- void *priv;
-};
-
-int v4l2_int_device_register(struct v4l2_int_device *d);
-void v4l2_int_device_unregister(struct v4l2_int_device *d);
-
-int v4l2_int_ioctl_0(struct v4l2_int_device *d, int cmd);
-int v4l2_int_ioctl_1(struct v4l2_int_device *d, int cmd, void *arg);
-
/*
*
* IOCTL wrapper functions for better type checking.
@@ -199,6 +224,7 @@ V4L2_INT_WRAPPER_1(s_parm, struct v4l2_streamparm, *);
V4L2_INT_WRAPPER_0(dev_init);
V4L2_INT_WRAPPER_0(dev_exit);
V4L2_INT_WRAPPER_1(s_power, int, );
+V4L2_INT_WRAPPER_1(g_ifparm, struct v4l2_ifparm, *);
V4L2_INT_WRAPPER_1(s_ext_clk, u32, );
V4L2_INT_WRAPPER_1(g_ext_clk, u32, *);
V4L2_INT_WRAPPER_1(g_needs_reset, void, *);