diff options
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/adv7393.h | 28 | ||||
-rw-r--r-- | include/media/gpio-ir-recv.h | 6 | ||||
-rw-r--r-- | include/media/mt9t001.h | 1 | ||||
-rw-r--r-- | include/media/v4l2-chip-ident.h | 3 | ||||
-rw-r--r-- | include/media/v4l2-dev.h | 3 | ||||
-rw-r--r-- | include/media/v4l2-ioctl.h | 25 | ||||
-rw-r--r-- | include/media/videobuf-core.h | 2 | ||||
-rw-r--r-- | include/media/videobuf2-core.h | 54 | ||||
-rw-r--r-- | include/media/videobuf2-dma-contig.h | 6 |
9 files changed, 104 insertions, 24 deletions
diff --git a/include/media/adv7393.h b/include/media/adv7393.h new file mode 100644 index 000000000000..b28edf351842 --- /dev/null +++ b/include/media/adv7393.h | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | * ADV7393 header file | ||
3 | * | ||
4 | * Copyright (C) 2010-2012 ADVANSEE - http://www.advansee.com/ | ||
5 | * Benoît Thébaudeau <benoit.thebaudeau@advansee.com> | ||
6 | * | ||
7 | * Based on ADV7343 driver, | ||
8 | * | ||
9 | * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/ | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or | ||
12 | * modify it under the terms of the GNU General Public License as | ||
13 | * published by the Free Software Foundation version 2. | ||
14 | * | ||
15 | * This program is distributed .as is. WITHOUT ANY WARRANTY of any | ||
16 | * kind, whether express or implied; without even the implied warranty | ||
17 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | * GNU General Public License for more details. | ||
19 | */ | ||
20 | |||
21 | #ifndef ADV7393_H | ||
22 | #define ADV7393_H | ||
23 | |||
24 | #define ADV7393_COMPOSITE_ID (0) | ||
25 | #define ADV7393_COMPONENT_ID (1) | ||
26 | #define ADV7393_SVIDEO_ID (2) | ||
27 | |||
28 | #endif /* End of #ifndef ADV7393_H */ | ||
diff --git a/include/media/gpio-ir-recv.h b/include/media/gpio-ir-recv.h index 67797bf5d432..0142736a59db 100644 --- a/include/media/gpio-ir-recv.h +++ b/include/media/gpio-ir-recv.h | |||
@@ -14,8 +14,10 @@ | |||
14 | #define __GPIO_IR_RECV_H__ | 14 | #define __GPIO_IR_RECV_H__ |
15 | 15 | ||
16 | struct gpio_ir_recv_platform_data { | 16 | struct gpio_ir_recv_platform_data { |
17 | int gpio_nr; | 17 | int gpio_nr; |
18 | bool active_low; | 18 | bool active_low; |
19 | u64 allowed_protos; | ||
20 | const char *map_name; | ||
19 | }; | 21 | }; |
20 | 22 | ||
21 | #endif /* __GPIO_IR_RECV_H__ */ | 23 | #endif /* __GPIO_IR_RECV_H__ */ |
diff --git a/include/media/mt9t001.h b/include/media/mt9t001.h index e839a78bb9c5..03fd63edd133 100644 --- a/include/media/mt9t001.h +++ b/include/media/mt9t001.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | struct mt9t001_platform_data { | 4 | struct mt9t001_platform_data { |
5 | unsigned int clk_pol:1; | 5 | unsigned int clk_pol:1; |
6 | unsigned int ext_clk; | ||
6 | }; | 7 | }; |
7 | 8 | ||
8 | #endif | 9 | #endif |
diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h index 7395c815939d..58f914a40b20 100644 --- a/include/media/v4l2-chip-ident.h +++ b/include/media/v4l2-chip-ident.h | |||
@@ -180,6 +180,9 @@ enum { | |||
180 | /* module adv7343: just ident 7343 */ | 180 | /* module adv7343: just ident 7343 */ |
181 | V4L2_IDENT_ADV7343 = 7343, | 181 | V4L2_IDENT_ADV7343 = 7343, |
182 | 182 | ||
183 | /* module adv7393: just ident 7393 */ | ||
184 | V4L2_IDENT_ADV7393 = 7393, | ||
185 | |||
183 | /* module saa7706h: just ident 7706 */ | 186 | /* module saa7706h: just ident 7706 */ |
184 | V4L2_IDENT_SAA7706H = 7706, | 187 | V4L2_IDENT_SAA7706H = 7706, |
185 | 188 | ||
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index a056e6ee1b68..5c416cdc88d5 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h | |||
@@ -100,6 +100,9 @@ struct video_device | |||
100 | /* Control handler associated with this device node. May be NULL. */ | 100 | /* Control handler associated with this device node. May be NULL. */ |
101 | struct v4l2_ctrl_handler *ctrl_handler; | 101 | struct v4l2_ctrl_handler *ctrl_handler; |
102 | 102 | ||
103 | /* vb2_queue associated with this device node. May be NULL. */ | ||
104 | struct vb2_queue *queue; | ||
105 | |||
103 | /* Priority state. If NULL, then v4l2_dev->prio will be used. */ | 106 | /* Priority state. If NULL, then v4l2_dev->prio will be used. */ |
104 | struct v4l2_prio_state *prio; | 107 | struct v4l2_prio_state *prio; |
105 | 108 | ||
diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h index d8b76f7392f8..19e93523c2d8 100644 --- a/include/media/v4l2-ioctl.h +++ b/include/media/v4l2-ioctl.h | |||
@@ -295,28 +295,19 @@ struct v4l2_ioctl_ops { | |||
295 | #define V4L2_DEBUG_IOCTL 0x01 | 295 | #define V4L2_DEBUG_IOCTL 0x01 |
296 | #define V4L2_DEBUG_IOCTL_ARG 0x02 | 296 | #define V4L2_DEBUG_IOCTL_ARG 0x02 |
297 | 297 | ||
298 | /* Use this macro for non-I2C drivers. Pass the driver name as the first arg. */ | ||
299 | #define v4l_print_ioctl(name, cmd) \ | ||
300 | do { \ | ||
301 | printk(KERN_DEBUG "%s: ", name); \ | ||
302 | v4l_printk_ioctl(cmd); \ | ||
303 | } while (0) | ||
304 | |||
305 | /* Use this macro in I2C drivers where 'client' is the struct i2c_client | ||
306 | pointer */ | ||
307 | #define v4l_i2c_print_ioctl(client, cmd) \ | ||
308 | do { \ | ||
309 | v4l_client_printk(KERN_DEBUG, client, ""); \ | ||
310 | v4l_printk_ioctl(cmd); \ | ||
311 | } while (0) | ||
312 | |||
313 | /* Video standard functions */ | 298 | /* Video standard functions */ |
314 | extern const char *v4l2_norm_to_name(v4l2_std_id id); | 299 | extern const char *v4l2_norm_to_name(v4l2_std_id id); |
315 | extern void v4l2_video_std_frame_period(int id, struct v4l2_fract *frameperiod); | 300 | extern void v4l2_video_std_frame_period(int id, struct v4l2_fract *frameperiod); |
316 | extern int v4l2_video_std_construct(struct v4l2_standard *vs, | 301 | extern int v4l2_video_std_construct(struct v4l2_standard *vs, |
317 | int id, const char *name); | 302 | int id, const char *name); |
318 | /* Prints the ioctl in a human-readable format */ | 303 | /* Prints the ioctl in a human-readable format. If prefix != NULL, |
319 | extern void v4l_printk_ioctl(unsigned int cmd); | 304 | then do printk(KERN_DEBUG "%s: ", prefix) first. */ |
305 | extern void v4l_printk_ioctl(const char *prefix, unsigned int cmd); | ||
306 | |||
307 | /* Internal use only: get the mutex (if any) that we need to lock for the | ||
308 | given command. */ | ||
309 | struct video_device; | ||
310 | extern struct mutex *v4l2_ioctl_get_lock(struct video_device *vdev, unsigned cmd); | ||
320 | 311 | ||
321 | /* names for fancy debug output */ | 312 | /* names for fancy debug output */ |
322 | extern const char *v4l2_field_names[]; | 313 | extern const char *v4l2_field_names[]; |
diff --git a/include/media/videobuf-core.h b/include/media/videobuf-core.h index 90ed895e217d..8c6e825940e5 100644 --- a/include/media/videobuf-core.h +++ b/include/media/videobuf-core.h | |||
@@ -72,7 +72,6 @@ struct videobuf_buffer { | |||
72 | unsigned int height; | 72 | unsigned int height; |
73 | unsigned int bytesperline; /* use only if != 0 */ | 73 | unsigned int bytesperline; /* use only if != 0 */ |
74 | unsigned long size; | 74 | unsigned long size; |
75 | unsigned int input; | ||
76 | enum v4l2_field field; | 75 | enum v4l2_field field; |
77 | enum videobuf_state state; | 76 | enum videobuf_state state; |
78 | struct list_head stream; /* QBUF/DQBUF list */ | 77 | struct list_head stream; /* QBUF/DQBUF list */ |
@@ -142,7 +141,6 @@ struct videobuf_queue { | |||
142 | wait_queue_head_t wait; /* wait if queue is empty */ | 141 | wait_queue_head_t wait; /* wait if queue is empty */ |
143 | 142 | ||
144 | enum v4l2_buf_type type; | 143 | enum v4l2_buf_type type; |
145 | unsigned int inputs; /* for V4L2_BUF_FLAG_INPUT */ | ||
146 | unsigned int msize; | 144 | unsigned int msize; |
147 | enum v4l2_field field; | 145 | enum v4l2_field field; |
148 | enum v4l2_field last; /* for field=V4L2_FIELD_ALTERNATE */ | 146 | enum v4l2_field last; /* for field=V4L2_FIELD_ALTERNATE */ |
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index a15d1f1b319e..8dd9b6cc296b 100644 --- a/include/media/videobuf2-core.h +++ b/include/media/videobuf2-core.h | |||
@@ -244,12 +244,23 @@ struct vb2_ops { | |||
244 | void (*buf_queue)(struct vb2_buffer *vb); | 244 | void (*buf_queue)(struct vb2_buffer *vb); |
245 | }; | 245 | }; |
246 | 246 | ||
247 | struct v4l2_fh; | ||
248 | |||
247 | /** | 249 | /** |
248 | * struct vb2_queue - a videobuf queue | 250 | * struct vb2_queue - a videobuf queue |
249 | * | 251 | * |
250 | * @type: queue type (see V4L2_BUF_TYPE_* in linux/videodev2.h | 252 | * @type: queue type (see V4L2_BUF_TYPE_* in linux/videodev2.h |
251 | * @io_modes: supported io methods (see vb2_io_modes enum) | 253 | * @io_modes: supported io methods (see vb2_io_modes enum) |
252 | * @io_flags: additional io flags (see vb2_fileio_flags enum) | 254 | * @io_flags: additional io flags (see vb2_fileio_flags enum) |
255 | * @lock: pointer to a mutex that protects the vb2_queue struct. The | ||
256 | * driver can set this to a mutex to let the v4l2 core serialize | ||
257 | * the queuing ioctls. If the driver wants to handle locking | ||
258 | * itself, then this should be set to NULL. This lock is not used | ||
259 | * by the videobuf2 core API. | ||
260 | * @owner: The filehandle that 'owns' the buffers, i.e. the filehandle | ||
261 | * that called reqbufs, create_buffers or started fileio. | ||
262 | * This field is not used by the videobuf2 core API, but it allows | ||
263 | * drivers to easily associate an owner filehandle with the queue. | ||
253 | * @ops: driver-specific callbacks | 264 | * @ops: driver-specific callbacks |
254 | * @mem_ops: memory allocator specific callbacks | 265 | * @mem_ops: memory allocator specific callbacks |
255 | * @drv_priv: driver private data | 266 | * @drv_priv: driver private data |
@@ -273,6 +284,8 @@ struct vb2_queue { | |||
273 | enum v4l2_buf_type type; | 284 | enum v4l2_buf_type type; |
274 | unsigned int io_modes; | 285 | unsigned int io_modes; |
275 | unsigned int io_flags; | 286 | unsigned int io_flags; |
287 | struct mutex *lock; | ||
288 | struct v4l2_fh *owner; | ||
276 | 289 | ||
277 | const struct vb2_ops *ops; | 290 | const struct vb2_ops *ops; |
278 | const struct vb2_mem_ops *mem_ops; | 291 | const struct vb2_mem_ops *mem_ops; |
@@ -404,4 +417,45 @@ vb2_plane_size(struct vb2_buffer *vb, unsigned int plane_no) | |||
404 | return 0; | 417 | return 0; |
405 | } | 418 | } |
406 | 419 | ||
420 | /* | ||
421 | * The following functions are not part of the vb2 core API, but are simple | ||
422 | * helper functions that you can use in your struct v4l2_file_operations, | ||
423 | * struct v4l2_ioctl_ops and struct vb2_ops. They will serialize if vb2_queue->lock | ||
424 | * or video_device->lock is set, and they will set and test vb2_queue->owner | ||
425 | * to check if the calling filehandle is permitted to do the queuing operation. | ||
426 | */ | ||
427 | |||
428 | /* struct v4l2_ioctl_ops helpers */ | ||
429 | |||
430 | int vb2_ioctl_reqbufs(struct file *file, void *priv, | ||
431 | struct v4l2_requestbuffers *p); | ||
432 | int vb2_ioctl_create_bufs(struct file *file, void *priv, | ||
433 | struct v4l2_create_buffers *p); | ||
434 | int vb2_ioctl_prepare_buf(struct file *file, void *priv, | ||
435 | struct v4l2_buffer *p); | ||
436 | int vb2_ioctl_querybuf(struct file *file, void *priv, struct v4l2_buffer *p); | ||
437 | int vb2_ioctl_qbuf(struct file *file, void *priv, struct v4l2_buffer *p); | ||
438 | int vb2_ioctl_dqbuf(struct file *file, void *priv, struct v4l2_buffer *p); | ||
439 | int vb2_ioctl_streamon(struct file *file, void *priv, enum v4l2_buf_type i); | ||
440 | int vb2_ioctl_streamoff(struct file *file, void *priv, enum v4l2_buf_type i); | ||
441 | |||
442 | /* struct v4l2_file_operations helpers */ | ||
443 | |||
444 | int vb2_fop_mmap(struct file *file, struct vm_area_struct *vma); | ||
445 | int vb2_fop_release(struct file *file); | ||
446 | ssize_t vb2_fop_write(struct file *file, char __user *buf, | ||
447 | size_t count, loff_t *ppos); | ||
448 | ssize_t vb2_fop_read(struct file *file, char __user *buf, | ||
449 | size_t count, loff_t *ppos); | ||
450 | unsigned int vb2_fop_poll(struct file *file, poll_table *wait); | ||
451 | #ifndef CONFIG_MMU | ||
452 | unsigned long vb2_fop_get_unmapped_area(struct file *file, unsigned long addr, | ||
453 | unsigned long len, unsigned long pgoff, unsigned long flags); | ||
454 | #endif | ||
455 | |||
456 | /* struct vb2_ops helpers, only use if vq->lock is non-NULL. */ | ||
457 | |||
458 | void vb2_ops_wait_prepare(struct vb2_queue *vq); | ||
459 | void vb2_ops_wait_finish(struct vb2_queue *vq); | ||
460 | |||
407 | #endif /* _MEDIA_VIDEOBUF2_CORE_H */ | 461 | #endif /* _MEDIA_VIDEOBUF2_CORE_H */ |
diff --git a/include/media/videobuf2-dma-contig.h b/include/media/videobuf2-dma-contig.h index 19ae1e350567..8197f87d6c61 100644 --- a/include/media/videobuf2-dma-contig.h +++ b/include/media/videobuf2-dma-contig.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * videobuf2-dma-coherent.h - DMA coherent memory allocator for videobuf2 | 2 | * videobuf2-dma-contig.h - DMA contig memory allocator for videobuf2 |
3 | * | 3 | * |
4 | * Copyright (C) 2010 Samsung Electronics | 4 | * Copyright (C) 2010 Samsung Electronics |
5 | * | 5 | * |
@@ -10,8 +10,8 @@ | |||
10 | * the Free Software Foundation. | 10 | * the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #ifndef _MEDIA_VIDEOBUF2_DMA_COHERENT_H | 13 | #ifndef _MEDIA_VIDEOBUF2_DMA_CONTIG_H |
14 | #define _MEDIA_VIDEOBUF2_DMA_COHERENT_H | 14 | #define _MEDIA_VIDEOBUF2_DMA_CONTIG_H |
15 | 15 | ||
16 | #include <media/videobuf2-core.h> | 16 | #include <media/videobuf2-core.h> |
17 | #include <linux/dma-mapping.h> | 17 | #include <linux/dma-mapping.h> |