]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - drivers/media/video/omap/sensor_if.h
OMAP: camera code cleanups and compilation fixes
[linux-2.6-omap-h63xx.git] / drivers / media / video / omap / sensor_if.h
1 /*
2  * drivers/media/video/omap/sensor_if.h
3  *
4  * Copyright (C) 2004 Texas Instruments, Inc. 
5  * 
6  * Sensor interface to OMAP camera capture drivers
7  * Sensor 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_SENSOR_IF_H
19 #define OMAP_SENSOR_IF_H
20
21 #define OMAP_SENSOR_NAME_LEN            31
22
23 struct omap_camera_sensor {
24         unsigned int version;
25         char name[OMAP_SENSOR_NAME_LEN + 1];
26
27         void *(*init)(struct v4l2_pix_format *);
28         int (*cleanup)(void *);
29
30         int (*power_on)(void *);
31         int (*power_off)(void *);
32
33         int (*enum_pixformat)(struct v4l2_fmtdesc *, void *);
34         int (*try_format)(struct v4l2_pix_format *, void *);
35
36         unsigned long (*calc_xclk)(struct v4l2_pix_format *,
37                                    struct v4l2_fract *, void *);
38
39         int (*configure)(struct v4l2_pix_format *, unsigned long,
40                          struct v4l2_fract *, void *);
41
42         int (*query_control) (struct v4l2_queryctrl *, void *);
43         int (*get_control)(struct v4l2_control *, void *);
44         int (*set_control)(struct v4l2_control *, void *);
45
46 };
47         
48 #endif