Merge remote-tracking branch 'moduleh/module.h-split'
[linux-2.6/next.git] / drivers / media / video / gspca / stv06xx / stv06xx_sensor.h
blobfb229d8ded58e1f112bb016df5c936ad966c9aca
1 /*
2 * Copyright (c) 2001 Jean-Fredric Clere, Nikolas Zimmermann, Georg Acher
3 * Mark Cave-Ayland, Carlo E Prelz, Dick Streefland
4 * Copyright (c) 2002, 2003 Tuukka Toivonen
5 * Copyright (c) 2008 Erik Andrén
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 * P/N 861037: Sensor HDCS1000 ASIC STV0600
22 * P/N 861050-0010: Sensor HDCS1000 ASIC STV0600
23 * P/N 861050-0020: Sensor Photobit PB100 ASIC STV0600-1 - QuickCam Express
24 * P/N 861055: Sensor ST VV6410 ASIC STV0610 - LEGO cam
25 * P/N 861075-0040: Sensor HDCS1000 ASIC
26 * P/N 961179-0700: Sensor ST VV6410 ASIC STV0602 - Dexxa WebCam USB
27 * P/N 861040-0000: Sensor ST VV6410 ASIC STV0610 - QuickCam Web
30 #ifndef STV06XX_SENSOR_H_
31 #define STV06XX_SENSOR_H_
33 #include "stv06xx.h"
35 #define IS_1020(sd) ((sd)->sensor == &stv06xx_sensor_hdcs1020)
37 extern const struct stv06xx_sensor stv06xx_sensor_vv6410;
38 extern const struct stv06xx_sensor stv06xx_sensor_hdcs1x00;
39 extern const struct stv06xx_sensor stv06xx_sensor_hdcs1020;
40 extern const struct stv06xx_sensor stv06xx_sensor_pb0100;
41 extern const struct stv06xx_sensor stv06xx_sensor_st6422;
43 struct stv06xx_sensor {
44 /* Defines the name of a sensor */
45 char name[32];
47 /* Sensor i2c address */
48 u8 i2c_addr;
50 /* Flush value*/
51 u8 i2c_flush;
53 /* length of an i2c word */
54 u8 i2c_len;
56 /* Isoc packet size (per mode) */
57 int min_packet_size[4];
58 int max_packet_size[4];
60 /* Probes if the sensor is connected */
61 int (*probe)(struct sd *sd);
63 /* Performs a initialization sequence */
64 int (*init)(struct sd *sd);
66 /* Executed at device disconnect */
67 void (*disconnect)(struct sd *sd);
69 /* Reads a sensor register */
70 int (*read_sensor)(struct sd *sd, const u8 address,
71 u8 *i2c_data, const u8 len);
73 /* Writes to a sensor register */
74 int (*write_sensor)(struct sd *sd, const u8 address,
75 u8 *i2c_data, const u8 len);
77 /* Instructs the sensor to start streaming */
78 int (*start)(struct sd *sd);
80 /* Instructs the sensor to stop streaming */
81 int (*stop)(struct sd *sd);
83 /* Instructs the sensor to dump all its contents */
84 int (*dump)(struct sd *sd);
87 #endif