2 * USB Driver for ALi m5602 based webcams
4 * Copyright (C) 2008 Erik Andrén
5 * Copyright (C) 2007 Ilyes Gouta. Based on the m5603x Linux Driver Project.
6 * Copyright (C) 2005 m5603x Linux Driver Project <m5602@x3ng.com.br>
8 * Portions of code to USB interface and ALi driver software,
9 * Copyright (c) 2006 Willem Duinker
10 * v4l2 interface modeled after the V4L2 driver
11 * for SN9C10x PC Camera Controllers
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License as
15 * published by the Free Software Foundation, version 2.
19 #ifndef M5602_SENSOR_H_
20 #define M5602_SENSOR_H_
22 #include "m5602_bridge.h"
24 #define M5602_DEFAULT_FRAME_WIDTH 640
25 #define M5602_DEFAULT_FRAME_HEIGHT 480
27 #define M5602_MAX_CTRLS (V4L2_CID_LASTP1 - V4L2_CID_BASE + 10)
29 /* Enumerates all supported sensors */
38 /* Enumerates all possible instruction types */
46 /* Defines the name of a sensor */
49 /* What i2c address the sensor is connected to */
52 /* Width of each i2c register (in bytes) */
55 /* Probes if the sensor is connected */
56 int (*probe)(struct sd *sd);
58 /* Performs a initialization sequence */
59 int (*init)(struct sd *sd);
61 /* Executed when the camera starts to send data */
62 int (*start)(struct sd *sd);
64 /* Performs a power down sequence */
65 int (*power_down)(struct sd *sd);
68 struct ctrl ctrls[M5602_MAX_CTRLS];
71 struct v4l2_pix_format modes[];