]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - drivers/media/video/omap/camera_hw_if.h
0976e45bd44aa66dc5f5127de9df07ebadc2aa74
[linux-2.6-omap-h63xx.git] / drivers / media / video / omap / camera_hw_if.h
1 /*
2  *  drivers/media/video/omap/camera_hw_if.h
3  *
4  * Copyright (C) 2004 Texas Instruments, Inc. 
5  * 
6  * Camera interface to OMAP camera capture drivers
7  * Camera interface hardware driver should implement this interface
8  *
9  * This package is free software; you can redistribute it and/or modify 
10  * it under the terms of the GNU General Public License version 2 as
11  * published by the Free Software Foundation. 
12  * 
13  * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 
14  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 
15  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
16  */
17  
18 #ifndef OMAP_CAMERA_HW_IF_H
19 #define OMAP_CAMERA_HW_IF_H
20
21 #define LEN_HW_IF_NAME          31
22
23 struct sgdma_state;
24
25 struct camera_hardware {
26         unsigned int version;  //version of camera driver module
27         char name[LEN_HW_IF_NAME + 1];
28
29         void *(*init)(void);
30         int (*cleanup)(void *);
31
32         int (*open)(void *);  /* acquire h/w resources (irq,DMA), etc. */
33         int (*close)(void *); /* free h/w resources, stop i/f */
34
35         int (*enable)(void *);
36         int (*disable)(void *);
37
38         int (*abort)(void *);
39
40         int (*set_xclk)(int, void *);
41
42         int (*init_dma)(void *);
43         int (*start_dma)(struct sgdma_state *, void (*)(void *arg1, void *arg2),
44                         void *, void *, void *);
45         int (*finish_dma)(void *);
46 };
47
48 extern struct camera_hardware camera_hardware_if;
49
50 #endif /* OMAP_CAMERA_HW_IF_H */