Path: blob/master/drivers/media/video/gspca/stv06xx/stv06xx_sensor.h
17889 views
/*1* Copyright (c) 2001 Jean-Fredric Clere, Nikolas Zimmermann, Georg Acher2* Mark Cave-Ayland, Carlo E Prelz, Dick Streefland3* Copyright (c) 2002, 2003 Tuukka Toivonen4* Copyright (c) 2008 Erik Andrén5*6* This program is free software; you can redistribute it and/or modify7* it under the terms of the GNU General Public License as published by8* the Free Software Foundation; either version 2 of the License, or9* (at your option) any later version.10*11* This program is distributed in the hope that it will be useful,12* but WITHOUT ANY WARRANTY; without even the implied warranty of13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14* GNU General Public License for more details.15*16* You should have received a copy of the GNU General Public License17* along with this program; if not, write to the Free Software18* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA19*20* P/N 861037: Sensor HDCS1000 ASIC STV060021* P/N 861050-0010: Sensor HDCS1000 ASIC STV060022* P/N 861050-0020: Sensor Photobit PB100 ASIC STV0600-1 - QuickCam Express23* P/N 861055: Sensor ST VV6410 ASIC STV0610 - LEGO cam24* P/N 861075-0040: Sensor HDCS1000 ASIC25* P/N 961179-0700: Sensor ST VV6410 ASIC STV0602 - Dexxa WebCam USB26* P/N 861040-0000: Sensor ST VV6410 ASIC STV0610 - QuickCam Web27*/2829#ifndef STV06XX_SENSOR_H_30#define STV06XX_SENSOR_H_3132#include "stv06xx.h"3334#define IS_1020(sd) ((sd)->sensor == &stv06xx_sensor_hdcs1020)3536extern const struct stv06xx_sensor stv06xx_sensor_vv6410;37extern const struct stv06xx_sensor stv06xx_sensor_hdcs1x00;38extern const struct stv06xx_sensor stv06xx_sensor_hdcs1020;39extern const struct stv06xx_sensor stv06xx_sensor_pb0100;40extern const struct stv06xx_sensor stv06xx_sensor_st6422;4142struct stv06xx_sensor {43/* Defines the name of a sensor */44char name[32];4546/* Sensor i2c address */47u8 i2c_addr;4849/* Flush value*/50u8 i2c_flush;5152/* length of an i2c word */53u8 i2c_len;5455/* Isoc packet size (per mode) */56int min_packet_size[4];57int max_packet_size[4];5859/* Probes if the sensor is connected */60int (*probe)(struct sd *sd);6162/* Performs a initialization sequence */63int (*init)(struct sd *sd);6465/* Executed at device disconnect */66void (*disconnect)(struct sd *sd);6768/* Reads a sensor register */69int (*read_sensor)(struct sd *sd, const u8 address,70u8 *i2c_data, const u8 len);7172/* Writes to a sensor register */73int (*write_sensor)(struct sd *sd, const u8 address,74u8 *i2c_data, const u8 len);7576/* Instructs the sensor to start streaming */77int (*start)(struct sd *sd);7879/* Instructs the sensor to stop streaming */80int (*stop)(struct sd *sd);8182/* Instructs the sensor to dump all its contents */83int (*dump)(struct sd *sd);84};8586#endif878889