Path: blob/master/drivers/media/video/gspca/gl860/gl860.h
17769 views
/* GSPCA subdrivers for Genesys Logic webcams with the GL860 chip1* Subdriver declarations2*3* 2009/10/14 Olivier LORIN <[email protected]>4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License as published by7* the Free Software Foundation; either version 2 of the License, or8* any later version.9*10* This program is distributed in the hope that it will be useful,11* but WITHOUT ANY WARRANTY; without even the implied warranty of12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13* GNU General Public License for more details.14*15* You should have received a copy of the GNU General Public License16* along with this program. If not, see <http://www.gnu.org/licenses/>.17*/18#ifndef GL860_DEV_H19#define GL860_DEV_H20#include <linux/version.h>2122#include "gspca.h"2324#define MODULE_NAME "gspca_gl860"25#define DRIVER_VERSION "0.9d10"2627#define ctrl_in gl860_RTx28#define ctrl_out gl860_RTx2930#define ID_MI1320 131#define ID_OV2640 232#define ID_OV9655 433#define ID_MI2020 83435#define _MI1320_ (((struct sd *) gspca_dev)->sensor == ID_MI1320)36#define _MI2020_ (((struct sd *) gspca_dev)->sensor == ID_MI2020)37#define _OV2640_ (((struct sd *) gspca_dev)->sensor == ID_OV2640)38#define _OV9655_ (((struct sd *) gspca_dev)->sensor == ID_OV9655)3940#define IMAGE_640 041#define IMAGE_800 142#define IMAGE_1280 243#define IMAGE_1600 34445struct sd_gl860 {46u16 backlight;47u16 brightness;48u16 sharpness;49u16 contrast;50u16 gamma;51u16 hue;52u16 saturation;53u16 whitebal;54u8 mirror;55u8 flip;56u8 AC50Hz;57};5859/* Specific webcam descriptor */60struct sd {61struct gspca_dev gspca_dev; /* !! must be the first item */6263struct sd_gl860 vcur;64struct sd_gl860 vold;65struct sd_gl860 vmax;6667int (*dev_configure_alt) (struct gspca_dev *);68int (*dev_init_at_startup)(struct gspca_dev *);69int (*dev_init_pre_alt) (struct gspca_dev *);70void (*dev_post_unset_alt) (struct gspca_dev *);71int (*dev_camera_settings)(struct gspca_dev *);7273u8 swapRB;74u8 mirrorMask;75u8 sensor;76s32 nbIm;77s32 nbRightUp;78u8 waitSet;79};8081struct validx {82u16 val;83u16 idx;84};8586struct idxdata {87u8 idx;88u8 data[3];89};9091int fetch_validx(struct gspca_dev *gspca_dev, struct validx *tbl, int len);92int keep_on_fetching_validx(struct gspca_dev *gspca_dev, struct validx *tbl,93int len, int n);94void fetch_idxdata(struct gspca_dev *gspca_dev, struct idxdata *tbl, int len);9596int gl860_RTx(struct gspca_dev *gspca_dev,97unsigned char pref, u32 req, u16 val, u16 index,98s32 len, void *pdata);99100void mi1320_init_settings(struct gspca_dev *);101void ov2640_init_settings(struct gspca_dev *);102void ov9655_init_settings(struct gspca_dev *);103void mi2020_init_settings(struct gspca_dev *);104105#endif106107108