1 /***************************************************************************
2 * Various definitions for compatibility with OVCAMCHIP external module. *
3 * This file is part of the W996[87]CF driver for Linux. *
5 * The definitions have been taken from the OVCAMCHIP module written by *
8 * This program is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU General Public License as published by *
10 * the Free Software Foundation; either version 2 of the License, or *
11 * (at your option) any later version. *
13 * This program is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU General Public License for more details. *
18 * You should have received a copy of the GNU General Public License *
19 * along with this program; if not, write to the Free Software *
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
21 ***************************************************************************/
23 #ifndef _W9968CF_EXTERNALDEF_H_
24 #define _W9968CF_EXTERNALDEF_H_
26 #include <linux/videodev.h>
27 #include <linux/i2c.h>
28 #include <asm/ioctl.h>
29 #include <asm/types.h>
31 #ifndef I2C_DRIVERID_OVCAMCHIP
32 # define I2C_DRIVERID_OVCAMCHIP 0xf00f
37 OVCAMCHIP_CID_CONT, /* Contrast */
38 OVCAMCHIP_CID_BRIGHT, /* Brightness */
39 OVCAMCHIP_CID_SAT, /* Saturation */
40 OVCAMCHIP_CID_HUE, /* Hue */
41 OVCAMCHIP_CID_EXP, /* Exposure */
42 OVCAMCHIP_CID_FREQ, /* Light frequency */
43 OVCAMCHIP_CID_BANDFILT, /* Banding filter */
44 OVCAMCHIP_CID_AUTOBRIGHT, /* Auto brightness */
45 OVCAMCHIP_CID_AUTOEXP, /* Auto exposure */
46 OVCAMCHIP_CID_BACKLIGHT, /* Back light compensation */
47 OVCAMCHIP_CID_MIRROR, /* Mirror horizontally */
51 #define OV7xx0_SID (0x42 >> 1)
52 #define OV6xx0_SID (0xC0 >> 1)
68 struct ovcamchip_control {
73 struct ovcamchip_window {
79 int quarter; /* Scale width and height down 2x */
81 /* This stuff will be removed eventually */
82 int clockdiv; /* Clock divisor setting */
86 You must call OVCAMCHIP_CMD_INITIALIZE before any of other commands */
87 #define OVCAMCHIP_CMD_Q_SUBTYPE _IOR (0x88, 0x00, int)
88 #define OVCAMCHIP_CMD_INITIALIZE _IOW (0x88, 0x01, int)
89 #define OVCAMCHIP_CMD_S_CTRL _IOW (0x88, 0x02, struct ovcamchip_control)
90 #define OVCAMCHIP_CMD_G_CTRL _IOWR (0x88, 0x03, struct ovcamchip_control)
91 #define OVCAMCHIP_CMD_S_MODE _IOW (0x88, 0x04, struct ovcamchip_window)
92 #define OVCAMCHIP_MAX_CMD _IO (0x88, 0x3f)
94 #endif /* _W9968CF_EXTERNALDEF_H_ */