Path: blob/master/drivers/media/video/gspca/m5602/m5602_sensor.h
17778 views
/*1* USB Driver for ALi m5602 based webcams2*3* Copyright (C) 2008 Erik Andrén4* Copyright (C) 2007 Ilyes Gouta. Based on the m5603x Linux Driver Project.5* Copyright (C) 2005 m5603x Linux Driver Project <[email protected]>6*7* Portions of code to USB interface and ALi driver software,8* Copyright (c) 2006 Willem Duinker9* v4l2 interface modeled after the V4L2 driver10* for SN9C10x PC Camera Controllers11*12* This program is free software; you can redistribute it and/or13* modify it under the terms of the GNU General Public License as14* published by the Free Software Foundation, version 2.15*16*/1718#ifndef M5602_SENSOR_H_19#define M5602_SENSOR_H_2021#include "m5602_bridge.h"2223#define M5602_V4L2_CID_GREEN_BALANCE (V4L2_CID_PRIVATE_BASE + 0)24#define M5602_V4L2_CID_NOISE_SUPPRESION (V4L2_CID_PRIVATE_BASE + 1)2526/* Enumerates all supported sensors */27enum sensors {28OV9650_SENSOR = 1,29S5K83A_SENSOR = 2,30S5K4AA_SENSOR = 3,31MT9M111_SENSOR = 4,32PO1030_SENSOR = 5,33OV7660_SENSOR = 6,34};3536/* Enumerates all possible instruction types */37enum instruction {38BRIDGE,39SENSOR,40SENSOR_LONG41};4243struct m5602_sensor {44/* Defines the name of a sensor */45char name[32];4647/* What i2c address the sensor is connected to */48u8 i2c_slave_id;4950/* Width of each i2c register (in bytes) */51u8 i2c_regW;5253/* Probes if the sensor is connected */54int (*probe)(struct sd *sd);5556/* Performs a initialization sequence */57int (*init)(struct sd *sd);5859/* Executed when the camera starts to send data */60int (*start)(struct sd *sd);6162/* Executed when the camera ends to send data */63int (*stop)(struct sd *sd);6465/* Executed when the device is disconnected */66void (*disconnect)(struct sd *sd);67};6869#endif707172