summaryrefslogtreecommitdiff
path: root/linux/include/media
diff options
context:
space:
mode:
Diffstat (limited to 'linux/include/media')
-rw-r--r--linux/include/media/ir-kbd-i2c.h3
-rw-r--r--linux/include/media/saa7146_vv.h1
-rw-r--r--linux/include/media/sh_mobile_ceu.h12
-rw-r--r--linux/include/media/soc_camera.h16
-rw-r--r--linux/include/media/soc_camera_platform.h15
-rw-r--r--linux/include/media/v4l2-common.h31
-rw-r--r--linux/include/media/v4l2-dev.h89
-rw-r--r--linux/include/media/v4l2-i2c-drv-legacy.h22
-rw-r--r--linux/include/media/v4l2-i2c-drv.h14
-rw-r--r--linux/include/media/v4l2-ioctl.h78
-rw-r--r--linux/include/media/videobuf-dma-contig.h32
-rw-r--r--linux/include/media/videobuf-dma-sg.h2
-rw-r--r--linux/include/media/videobuf-vmalloc.h2
13 files changed, 208 insertions, 109 deletions
diff --git a/linux/include/media/ir-kbd-i2c.h b/linux/include/media/ir-kbd-i2c.h
index a455f7ce5..00fa57eb9 100644
--- a/linux/include/media/ir-kbd-i2c.h
+++ b/linux/include/media/ir-kbd-i2c.h
@@ -19,7 +19,4 @@ struct IR_i2c {
char phys[32];
int (*get_key)(struct IR_i2c*, u32*, u32*);
};
-
-int get_key_pinnacle_grey(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw);
-int get_key_pinnacle_color(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw);
#endif
diff --git a/linux/include/media/saa7146_vv.h b/linux/include/media/saa7146_vv.h
index 89c442eb8..1d1040966 100644
--- a/linux/include/media/saa7146_vv.h
+++ b/linux/include/media/saa7146_vv.h
@@ -2,6 +2,7 @@
#define __SAA7146_VV__
#include <media/v4l2-common.h>
+#include <media/v4l2-ioctl.h>
#include <media/saa7146.h>
#include <media/videobuf-dma-sg.h>
diff --git a/linux/include/media/sh_mobile_ceu.h b/linux/include/media/sh_mobile_ceu.h
new file mode 100644
index 000000000..234a4711d
--- /dev/null
+++ b/linux/include/media/sh_mobile_ceu.h
@@ -0,0 +1,12 @@
+#ifndef __ASM_SH_MOBILE_CEU_H__
+#define __ASM_SH_MOBILE_CEU_H__
+
+#include <media/soc_camera.h>
+
+struct sh_mobile_ceu_info {
+ unsigned long flags; /* SOCAM_... */
+ void (*enable_camera)(void);
+ void (*disable_camera)(void);
+};
+
+#endif /* __ASM_SH_MOBILE_CEU_H__ */
diff --git a/linux/include/media/soc_camera.h b/linux/include/media/soc_camera.h
index 6a8c8be7a..1de98f150 100644
--- a/linux/include/media/soc_camera.h
+++ b/linux/include/media/soc_camera.h
@@ -13,7 +13,7 @@
#define SOC_CAMERA_H
#include <linux/videodev2.h>
-#include <media/videobuf-dma-sg.h>
+#include <media/videobuf-core.h>
struct soc_camera_device {
struct list_head list;
@@ -48,15 +48,12 @@ struct soc_camera_device {
struct soc_camera_file {
struct soc_camera_device *icd;
struct videobuf_queue vb_vidq;
- spinlock_t *lock;
};
struct soc_camera_host {
struct list_head list;
struct device dev;
unsigned char nr; /* Host number */
- size_t msize;
- struct videobuf_queue_ops *vbq_ops;
void *priv;
char *drv_name;
struct soc_camera_host_ops *ops;
@@ -69,13 +66,13 @@ struct soc_camera_host_ops {
int (*set_fmt_cap)(struct soc_camera_device *, __u32,
struct v4l2_rect *);
int (*try_fmt_cap)(struct soc_camera_device *, struct v4l2_format *);
+ void (*init_videobuf)(struct videobuf_queue *,
+ struct soc_camera_device *);
int (*reqbufs)(struct soc_camera_file *, struct v4l2_requestbuffers *);
int (*querycap)(struct soc_camera_host *, struct v4l2_capability *);
int (*try_bus_param)(struct soc_camera_device *, __u32);
int (*set_bus_param)(struct soc_camera_device *, __u32);
unsigned int (*poll)(struct file *, poll_table *);
- spinlock_t* (*spinlock_alloc)(struct soc_camera_file *);
- void (*spinlock_free)(spinlock_t *);
};
struct soc_camera_link {
@@ -156,11 +153,12 @@ static inline struct v4l2_queryctrl const *soc_camera_find_qctrl(
#define SOCAM_DATAWIDTH_8 (1 << 6)
#define SOCAM_DATAWIDTH_9 (1 << 7)
#define SOCAM_DATAWIDTH_10 (1 << 8)
-#define SOCAM_PCLK_SAMPLE_RISING (1 << 9)
-#define SOCAM_PCLK_SAMPLE_FALLING (1 << 10)
+#define SOCAM_DATAWIDTH_16 (1 << 9)
+#define SOCAM_PCLK_SAMPLE_RISING (1 << 10)
+#define SOCAM_PCLK_SAMPLE_FALLING (1 << 11)
#define SOCAM_DATAWIDTH_MASK (SOCAM_DATAWIDTH_8 | SOCAM_DATAWIDTH_9 | \
- SOCAM_DATAWIDTH_10)
+ SOCAM_DATAWIDTH_10 | SOCAM_DATAWIDTH_16)
static inline unsigned long soc_camera_bus_param_compatible(
unsigned long camera_flags, unsigned long bus_flags)
diff --git a/linux/include/media/soc_camera_platform.h b/linux/include/media/soc_camera_platform.h
new file mode 100644
index 000000000..851f18220
--- /dev/null
+++ b/linux/include/media/soc_camera_platform.h
@@ -0,0 +1,15 @@
+#ifndef __SOC_CAMERA_H__
+#define __SOC_CAMERA_H__
+
+#include <linux/videodev2.h>
+
+struct soc_camera_platform_info {
+ int iface;
+ char *format_name;
+ unsigned long format_depth;
+ struct v4l2_pix_format format;
+ unsigned long bus_param;
+ int (*set_capture)(struct soc_camera_platform_info *info, int enable);
+};
+
+#endif /* __SOC_CAMERA_H__ */
diff --git a/linux/include/media/v4l2-common.h b/linux/include/media/v4l2-common.h
index 020d05758..07d3a9a57 100644
--- a/linux/include/media/v4l2-common.h
+++ b/linux/include/media/v4l2-common.h
@@ -28,12 +28,6 @@
#include <media/v4l2-dev.h>
-/* v4l debugging and diagnostics */
-
-/* Debug bitmask flags to be used on V4L2 */
-#define V4L2_DEBUG_IOCTL 0x01
-#define V4L2_DEBUG_IOCTL_ARG 0x02
-
/* Common printk constucts for v4l-i2c drivers. These macros create a unique
prefix consisting of the driver name, the adapter number and the i2c
address. */
@@ -61,21 +55,20 @@
v4l_client_printk(KERN_DEBUG, client, fmt , ## arg); \
} while (0)
+/* ------------------------------------------------------------------------- */
-/* Use this macro for non-I2C drivers. Pass the driver name as the first arg. */
-#define v4l_print_ioctl(name, cmd) \
- do { \
- printk(KERN_DEBUG "%s: ", name); \
- v4l_printk_ioctl(cmd); \
- } while (0)
+/* Priority helper functions */
-/* Use this macro in I2C drivers where 'client' is the struct i2c_client
- pointer */
-#define v4l_i2c_print_ioctl(client, cmd) \
- do { \
- v4l_client_printk(KERN_DEBUG, client, ""); \
- v4l_printk_ioctl(cmd); \
- } while (0)
+struct v4l2_prio_state {
+ atomic_t prios[4];
+};
+int v4l2_prio_init(struct v4l2_prio_state *global);
+int v4l2_prio_change(struct v4l2_prio_state *global, enum v4l2_priority *local,
+ enum v4l2_priority new);
+int v4l2_prio_open(struct v4l2_prio_state *global, enum v4l2_priority *local);
+int v4l2_prio_close(struct v4l2_prio_state *global, enum v4l2_priority *local);
+enum v4l2_priority v4l2_prio_max(struct v4l2_prio_state *global);
+int v4l2_prio_check(struct v4l2_prio_state *global, enum v4l2_priority *local);
/* ------------------------------------------------------------------------- */
diff --git a/linux/include/media/v4l2-dev.h b/linux/include/media/v4l2-dev.h
index aa0fd8c94..46a671e32 100644
--- a/linux/include/media/v4l2-dev.h
+++ b/linux/include/media/v4l2-dev.h
@@ -39,43 +39,6 @@
#define VFL_TYPE_RADIO 2
#define VFL_TYPE_VTX 3
-/* Video standard functions */
-extern const char *v4l2_norm_to_name(v4l2_std_id id);
-extern int v4l2_video_std_construct(struct v4l2_standard *vs,
- int id, const char *name);
-/* Prints the ioctl in a human-readable format */
-extern void v4l_printk_ioctl(unsigned int cmd);
-
-/* prority handling */
-struct v4l2_prio_state {
- atomic_t prios[4];
-};
-int v4l2_prio_init(struct v4l2_prio_state *global);
-int v4l2_prio_change(struct v4l2_prio_state *global, enum v4l2_priority *local,
- enum v4l2_priority new);
-int v4l2_prio_open(struct v4l2_prio_state *global, enum v4l2_priority *local);
-int v4l2_prio_close(struct v4l2_prio_state *global, enum v4l2_priority *local);
-enum v4l2_priority v4l2_prio_max(struct v4l2_prio_state *global);
-int v4l2_prio_check(struct v4l2_prio_state *global, enum v4l2_priority *local);
-
-/* names for fancy debug output */
-extern const char *v4l2_field_names[];
-extern const char *v4l2_type_names[];
-
-/* Compatibility layer interface -- v4l1-compat module */
-typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file,
- unsigned int cmd, void *arg);
-#ifdef CONFIG_VIDEO_V4L1_COMPAT
-int v4l_compat_translate_ioctl(struct inode *inode, struct file *file,
- int cmd, void *arg, v4l2_kioctl driver_ioctl);
-#else
-#define v4l_compat_translate_ioctl(inode,file,cmd,arg,ioctl) -EINVAL
-#endif
-
-/* 32 Bits compatibility layer for 64 bits processors */
-extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd,
- unsigned long arg);
-
/*
* Newer version of video_device, handled by videodev2.c
* This version moves redundant code from video device code to
@@ -85,25 +48,25 @@ extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd,
struct video_device
{
/* device ops */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17)
const struct file_operations *fops;
-#else
- struct file_operations *fops;
-#endif
/* sysfs */
- struct device class_dev; /* v4l device */
- struct device *dev; /* device parent */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19)
+ struct device dev; /* v4l device */
+#else
+ struct class_device dev;
+#endif
+ struct device *parent; /* device parent */
/* device info */
char name[32];
- int type; /* v4l1 */
- int type2; /* v4l2 */
+ int type; /* v4l1 */
+ int type2; /* v4l2 */
int minor;
/* attribute to diferentiate multiple indexs on one physical device */
int index;
- int debug; /* Activates debug level*/
+ int debug; /* Activates debug level*/
/* Video standard vars */
v4l2_std_id tvnorms; /* Supported tv norms */
@@ -359,45 +322,55 @@ void *priv;
};
/* Class-dev to video-device */
-#define to_video_device(cd) container_of(cd, struct video_device, class_dev)
+#define to_video_device(cd) container_of(cd, struct video_device, dev)
/* Version 2 functions */
extern int video_register_device(struct video_device *vfd, int type, int nr);
int video_register_device_index(struct video_device *vfd, int type, int nr,
int index);
void video_unregister_device(struct video_device *);
-extern int video_ioctl2(struct inode *inode, struct file *file,
- unsigned int cmd, unsigned long arg);
/* helper functions to alloc / release struct video_device, the
later can be used for video_device->release() */
struct video_device *video_device_alloc(void);
void video_device_release(struct video_device *vfd);
-/* Include support for obsoleted stuff */
-extern int video_usercopy(struct inode *inode, struct file *file,
- unsigned int cmd, unsigned long arg,
- int (*func)(struct inode *inode, struct file *file,
- unsigned int cmd, void *arg));
-
#ifdef CONFIG_VIDEO_V4L1_COMPAT
#include <linux/mm.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
+static inline int __must_check
+video_device_create_file(struct video_device *vfd,
+ struct class_device_attribute *attr)
+{
+ int ret = class_device_create_file(&vfd->dev, attr);
+ if (ret < 0)
+ printk(KERN_WARNING "%s error: %d\n", __func__, ret);
+ return ret;
+}
+static inline void
+video_device_remove_file(struct video_device *vfd,
+ struct class_device_attribute *attr)
+{
+ class_device_remove_file(&vfd->dev, attr);
+}
+#else
static inline int __must_check
video_device_create_file(struct video_device *vfd,
struct device_attribute *attr)
{
- int ret = device_create_file(&vfd->class_dev, attr);
+ int ret = device_create_file(&vfd->dev, attr);
if (ret < 0)
- printk(KERN_WARNING "%s error: %d\n", __FUNCTION__, ret);
+ printk(KERN_WARNING "%s error: %d\n", __func__, ret);
return ret;
}
static inline void
video_device_remove_file(struct video_device *vfd,
struct device_attribute *attr)
{
- device_remove_file(&vfd->class_dev, attr);
+ device_remove_file(&vfd->dev, attr);
}
+#endif
#endif /* CONFIG_VIDEO_V4L1_COMPAT */
diff --git a/linux/include/media/v4l2-i2c-drv-legacy.h b/linux/include/media/v4l2-i2c-drv-legacy.h
index 31d6e103c..299b1c344 100644
--- a/linux/include/media/v4l2-i2c-drv-legacy.h
+++ b/linux/include/media/v4l2-i2c-drv-legacy.h
@@ -37,7 +37,7 @@ struct v4l2_i2c_driver_data {
};
static struct v4l2_i2c_driver_data v4l2_i2c_data;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
static const struct i2c_client_address_data addr_data;
#else
static struct i2c_client_address_data addr_data;
@@ -77,25 +77,25 @@ static int v4l2_i2c_drv_detach_legacy(struct i2c_client *client)
return 0;
}
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20)
static int v4l2_i2c_drv_suspend_helper(struct i2c_client *client, pm_message_t state)
#else
static int v4l2_i2c_drv_suspend_helper(struct device * dev, pm_message_t state)
#endif
{
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20)
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 20)
struct i2c_client *client = container_of(dev, struct i2c_client, dev);
#endif
return v4l2_i2c_data.suspend ? v4l2_i2c_data.suspend(client, state) : 0;
}
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20)
static int v4l2_i2c_drv_resume_helper(struct i2c_client *client)
#else
static int v4l2_i2c_drv_resume_helper(struct device * dev)
#endif
{
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20)
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 20)
struct i2c_client *client = container_of(dev, struct i2c_client, dev);
#endif
return v4l2_i2c_data.resume ? v4l2_i2c_data.resume(client) : 0;
@@ -107,14 +107,14 @@ static int v4l2_i2c_drv_resume_helper(struct device * dev)
static struct i2c_driver v4l2_i2c_driver_legacy = {
.driver = {
.owner = THIS_MODULE,
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20)
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 20)
.suspend = v4l2_i2c_drv_suspend_helper,
.resume = v4l2_i2c_drv_resume_helper,
#endif
},
.attach_adapter = v4l2_i2c_drv_probe_legacy,
.detach_client = v4l2_i2c_drv_detach_legacy,
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20)
.suspend = v4l2_i2c_drv_suspend_helper,
.resume = v4l2_i2c_drv_resume_helper,
#endif
@@ -123,18 +123,18 @@ static struct i2c_driver v4l2_i2c_driver_legacy = {
/* ----------------------------------------------------------------------- */
/* i2c implementation */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
static struct i2c_driver v4l2_i2c_driver = {
.suspend = v4l2_i2c_drv_suspend_helper,
.resume = v4l2_i2c_drv_resume_helper,
};
-#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
static int compat_legacy_probe(struct i2c_client *client)
{
return v4l2_i2c_data.probe(client, NULL);
}
#endif
+#endif
static int __init v4l2_i2c_drv_init(void)
{
@@ -151,7 +151,7 @@ static int __init v4l2_i2c_drv_init(void)
v4l2_i2c_driver_legacy.command = v4l2_i2c_data.command;
err = i2c_add_driver(&v4l2_i2c_driver_legacy);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
if (err)
return err;
v4l2_i2c_driver.driver.name = v4l2_i2c_data.name;
@@ -176,7 +176,7 @@ static int __init v4l2_i2c_drv_init(void)
static void __exit v4l2_i2c_drv_cleanup(void)
{
i2c_del_driver(&v4l2_i2c_driver_legacy);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
i2c_del_driver(&v4l2_i2c_driver);
#endif
}
diff --git a/linux/include/media/v4l2-i2c-drv.h b/linux/include/media/v4l2-i2c-drv.h
index 9333e56b3..1feadb6c1 100644
--- a/linux/include/media/v4l2-i2c-drv.h
+++ b/linux/include/media/v4l2-i2c-drv.h
@@ -44,13 +44,13 @@ struct v4l2_i2c_driver_data {
static struct v4l2_i2c_driver_data v4l2_i2c_data;
static struct i2c_driver v4l2_i2c_driver;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
static int compat_legacy_probe(struct i2c_client *client)
{
return v4l2_i2c_data.probe(client, NULL);
}
#endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
/* Bus-based I2C implementation for kernels >= 2.6.22 */
@@ -111,25 +111,25 @@ static int v4l2_i2c_drv_detach_legacy(struct i2c_client *client)
return 0;
}
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20)
static int v4l2_i2c_drv_suspend_helper(struct i2c_client *client, pm_message_t state)
#else
static int v4l2_i2c_drv_suspend_helper(struct device * dev, pm_message_t state)
#endif
{
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20)
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 20)
struct i2c_client *client = container_of(dev, struct i2c_client, dev);
#endif
return v4l2_i2c_data.suspend ? v4l2_i2c_data.suspend(client, state) : 0;
}
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20)
static int v4l2_i2c_drv_resume_helper(struct i2c_client *client)
#else
static int v4l2_i2c_drv_resume_helper(struct device * dev)
#endif
{
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20)
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 20)
struct i2c_client *client = container_of(dev, struct i2c_client, dev);
#endif
return v4l2_i2c_data.resume ? v4l2_i2c_data.resume(client) : 0;
@@ -140,14 +140,14 @@ static int v4l2_i2c_drv_resume_helper(struct device * dev)
static struct i2c_driver v4l2_i2c_driver = {
.driver = {
.owner = THIS_MODULE,
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20)
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 20)
.suspend = v4l2_i2c_drv_suspend_helper,
.resume = v4l2_i2c_drv_resume_helper,
#endif
},
.attach_adapter = v4l2_i2c_drv_probe_legacy,
.detach_client = v4l2_i2c_drv_detach_legacy,
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20)
.suspend = v4l2_i2c_drv_suspend_helper,
.resume = v4l2_i2c_drv_resume_helper,
#endif
diff --git a/linux/include/media/v4l2-ioctl.h b/linux/include/media/v4l2-ioctl.h
new file mode 100644
index 000000000..e319d1fff
--- /dev/null
+++ b/linux/include/media/v4l2-ioctl.h
@@ -0,0 +1,78 @@
+/*
+ *
+ * V 4 L 2 D R I V E R H E L P E R A P I
+ *
+ * Moved from videodev2.h
+ *
+ * Some commonly needed functions for drivers (v4l2-common.o module)
+ */
+#ifndef _V4L2_IOCTL_H
+#define _V4L2_IOCTL_H
+
+#include <linux/poll.h>
+#include <linux/fs.h>
+#include <linux/device.h>
+#include <linux/mutex.h>
+#include <linux/compiler.h> /* need __user */
+#ifdef CONFIG_VIDEO_V4L1_COMPAT
+#include <linux/videodev.h>
+#else
+#include <linux/videodev2.h>
+#endif
+
+/* v4l debugging and diagnostics */
+
+/* Debug bitmask flags to be used on V4L2 */
+#define V4L2_DEBUG_IOCTL 0x01
+#define V4L2_DEBUG_IOCTL_ARG 0x02
+
+/* Use this macro for non-I2C drivers. Pass the driver name as the first arg. */
+#define v4l_print_ioctl(name, cmd) \
+ do { \
+ printk(KERN_DEBUG "%s: ", name); \
+ v4l_printk_ioctl(cmd); \
+ } while (0)
+
+/* Use this macro in I2C drivers where 'client' is the struct i2c_client
+ pointer */
+#define v4l_i2c_print_ioctl(client, cmd) \
+ do { \
+ v4l_client_printk(KERN_DEBUG, client, ""); \
+ v4l_printk_ioctl(cmd); \
+ } while (0)
+
+/* Video standard functions */
+extern const char *v4l2_norm_to_name(v4l2_std_id id);
+extern int v4l2_video_std_construct(struct v4l2_standard *vs,
+ int id, const char *name);
+/* Prints the ioctl in a human-readable format */
+extern void v4l_printk_ioctl(unsigned int cmd);
+
+/* names for fancy debug output */
+extern const char *v4l2_field_names[];
+extern const char *v4l2_type_names[];
+
+/* Compatibility layer interface -- v4l1-compat module */
+typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file,
+ unsigned int cmd, void *arg);
+#ifdef CONFIG_VIDEO_V4L1_COMPAT
+int v4l_compat_translate_ioctl(struct inode *inode, struct file *file,
+ int cmd, void *arg, v4l2_kioctl driver_ioctl);
+#else
+#define v4l_compat_translate_ioctl(inode, file, cmd, arg, ioctl) (-EINVAL)
+#endif
+
+/* 32 Bits compatibility layer for 64 bits processors */
+extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd,
+ unsigned long arg);
+
+extern int video_ioctl2(struct inode *inode, struct file *file,
+ unsigned int cmd, unsigned long arg);
+
+/* Include support for obsoleted stuff */
+extern int video_usercopy(struct inode *inode, struct file *file,
+ unsigned int cmd, unsigned long arg,
+ int (*func)(struct inode *inode, struct file *file,
+ unsigned int cmd, void *arg));
+
+#endif /* _V4L2_IOCTL_H */
diff --git a/linux/include/media/videobuf-dma-contig.h b/linux/include/media/videobuf-dma-contig.h
new file mode 100644
index 000000000..549386681
--- /dev/null
+++ b/linux/include/media/videobuf-dma-contig.h
@@ -0,0 +1,32 @@
+/*
+ * helper functions for physically contiguous capture buffers
+ *
+ * The functions support hardware lacking scatter gather support
+ * (i.e. the buffers must be linear in physical memory)
+ *
+ * Copyright (c) 2008 Magnus Damm
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2
+ */
+#ifndef _VIDEOBUF_DMA_CONTIG_H
+#define _VIDEOBUF_DMA_CONTIG_H
+
+#include <linux/dma-mapping.h>
+#include <media/videobuf-core.h>
+
+void videobuf_queue_dma_contig_init(struct videobuf_queue *q,
+ struct videobuf_queue_ops *ops,
+ struct device *dev,
+ spinlock_t *irqlock,
+ enum v4l2_buf_type type,
+ enum v4l2_field field,
+ unsigned int msize,
+ void *priv);
+
+dma_addr_t videobuf_to_dma_contig(struct videobuf_buffer *buf);
+void videobuf_dma_contig_free(struct videobuf_queue *q,
+ struct videobuf_buffer *buf);
+
+#endif /* _VIDEOBUF_DMA_CONTIG_H */
diff --git a/linux/include/media/videobuf-dma-sg.h b/linux/include/media/videobuf-dma-sg.h
index be8da269e..90edd22d3 100644
--- a/linux/include/media/videobuf-dma-sg.h
+++ b/linux/include/media/videobuf-dma-sg.h
@@ -1,7 +1,7 @@
/*
* helper functions for SG DMA video4linux capture buffers
*
- * The functions expect the hardware being able to scatter gatter
+ * The functions expect the hardware being able to scatter gather
* (i.e. the buffers are not linear in physical memory, but fragmented
* into PAGE_SIZE chunks). They also assume the driver does not need
* to touch the video data.
diff --git a/linux/include/media/videobuf-vmalloc.h b/linux/include/media/videobuf-vmalloc.h
index aed39460c..e87222c6a 100644
--- a/linux/include/media/videobuf-vmalloc.h
+++ b/linux/include/media/videobuf-vmalloc.h
@@ -1,7 +1,7 @@
/*
* helper functions for vmalloc capture buffers
*
- * The functions expect the hardware being able to scatter gatter
+ * The functions expect the hardware being able to scatter gather
* (i.e. the buffers are not linear in physical memory, but fragmented
* into PAGE_SIZE chunks). They also assume the driver does not need
* to touch the video data.