Staging: go7007: add sensoray 2250/2251 support
[safe/jmp/linux-2.6] / drivers / staging / go7007 / wis-i2c.h
1 /*
2  * Copyright (C) 2005-2006 Micronas USA Inc.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License (Version 2) as
6  * published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software Foundation,
15  * Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
16  */
17
18 /* Temporary I2C IDs -- these need to be replaced with real registered IDs */
19 #define I2C_DRIVERID_WIS_SAA7115        0xf0f0
20 #define I2C_DRIVERID_WIS_UDA1342        0xf0f1
21 #define I2C_DRIVERID_WIS_SONY_TUNER     0xf0f2
22 #define I2C_DRIVERID_WIS_TW9903         0xf0f3
23 #define I2C_DRIVERID_WIS_SAA7113        0xf0f4
24 #define I2C_DRIVERID_WIS_OV7640         0xf0f5
25 #define I2C_DRIVERID_WIS_TW2804         0xf0f6
26 #define I2C_DRIVERID_S2250              0xf0f7
27 #define I2C_ALGO_GO7007                 0xf00000
28 #define I2C_ALGO_GO7007_USB             0xf10000
29
30 /* Flag to indicate that the client needs to be accessed with SCCB semantics */
31 /* We re-use the I2C_M_TEN value so the flag passes through the masks in the
32  * core I2C code.  Major kludge, but the I2C layer ain't exactly flexible. */
33 #define I2C_CLIENT_SCCB                 0x10
34
35 typedef int (*found_proc) (struct i2c_adapter *, int, int);
36 int wis_i2c_add_driver(unsigned int id, found_proc found_proc);
37 void wis_i2c_del_driver(found_proc found_proc);
38
39 int wis_i2c_probe_device(struct i2c_adapter *adapter,
40                                 unsigned int id, int addr);
41
42 /* Definitions for new video decoder commands */
43
44 struct video_decoder_resolution {
45         unsigned int width;
46         unsigned int height;
47 };
48
49 #define DECODER_SET_RESOLUTION  _IOW('d', 200, struct video_decoder_resolution)
50 #define DECODER_SET_CHANNEL     _IOW('d', 201, int)
51
52 /* Sony tuner types */
53
54 #define TUNER_SONY_BTF_PG472Z           200
55 #define TUNER_SONY_BTF_PK467Z           201
56 #define TUNER_SONY_BTF_PB463Z           202