3 * drivers/media/video/omap/sensor_if.h
5 * Copyright (C) 2004 Texas Instruments, Inc.
7 * Sensor interface to OMAP camera capture drivers
8 * Sensor driver should implement this interface
10 * This package is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
14 * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
15 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
16 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19 #ifndef OMAP_SENSOR_IF_H
20 #define OMAP_SENSOR_IF_H
22 #define LEN_SENSOR_NAME 31
24 struct camera_sensor {
26 char name[LEN_SENSOR_NAME + 1];
28 void *(*init)(struct v4l2_pix_format *);
29 int (*cleanup)(void *);
31 int (*power_on)(void *);
32 int (*power_off)(void *);
34 int (*enum_pixformat)(struct v4l2_fmtdesc *, void *);
35 int (*try_format) (struct v4l2_pix_format *, void *);
37 unsigned long (*calc_xclk) (struct v4l2_pix_format *,
38 struct v4l2_fract *, void *);
40 int (*configure) (struct v4l2_pix_format *, unsigned long,
41 struct v4l2_fract *, void *);
43 int (*query_control) (struct v4l2_queryctrl *, void *);
44 int (*get_control) (struct v4l2_control *, void *);
45 int (*set_control) (struct v4l2_control *, void *);