2 * drivers/media/video/omap/sensor_if.h
4 * Copyright (C) 2004 Texas Instruments, Inc.
6 * Sensor interface to OMAP camera capture drivers
7 * Sensor driver should implement this interface
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.
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.
18 #ifndef OMAP_SENSOR_IF_H
19 #define OMAP_SENSOR_IF_H
21 #define OMAP_SENSOR_NAME_LEN 31
23 struct omap_camera_sensor {
25 char name[OMAP_SENSOR_NAME_LEN + 1];
27 void *(*init)(struct v4l2_pix_format *);
28 int (*cleanup)(void *);
30 int (*power_on)(void *);
31 int (*power_off)(void *);
33 int (*enum_pixformat)(struct v4l2_fmtdesc *, void *);
34 int (*try_format)(struct v4l2_pix_format *, void *);
36 unsigned long (*calc_xclk)(struct v4l2_pix_format *,
37 struct v4l2_fract *, void *);
39 int (*configure)(struct v4l2_pix_format *, unsigned long,
40 struct v4l2_fract *, void *);
42 int (*query_control) (struct v4l2_queryctrl *, void *);
43 int (*get_control)(struct v4l2_control *, void *);
44 int (*set_control)(struct v4l2_control *, void *);
48 extern struct omap_camera_sensor camera_sensor_if;