]> nv-tegra.nvidia Code Review - linux-2.6.git/blob - drivers/staging/go7007/wis-i2c.h
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi...
[linux-2.6.git] / 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_ALGO_GO7007                 0xf00000
27 #define I2C_ALGO_GO7007_USB             0xf10000
28
29 /* Flag to indicate that the client needs to be accessed with SCCB semantics */
30 /* We re-use the I2C_M_TEN value so the flag passes through the masks in the
31  * core I2C code.  Major kludge, but the I2C layer ain't exactly flexible. */
32 #define I2C_CLIENT_SCCB                 0x10
33
34 typedef int (*found_proc) (struct i2c_adapter *, int, int);
35 int wis_i2c_add_driver(unsigned int id, found_proc found_proc);
36 void wis_i2c_del_driver(found_proc found_proc);
37
38 int wis_i2c_probe_device(struct i2c_adapter *adapter,
39                                 unsigned int id, int addr);
40
41 /* Definitions for new video decoder commands */
42
43 struct video_decoder_resolution {
44         unsigned int width;
45         unsigned int height;
46 };
47
48 #define DECODER_SET_RESOLUTION  _IOW('d', 200, struct video_decoder_resolution)
49 #define DECODER_SET_CHANNEL     _IOW('d', 201, int)
50
51 /* Sony tuner types */
52
53 #define TUNER_SONY_BTF_PG472Z           200
54 #define TUNER_SONY_BTF_PK467Z           201
55 #define TUNER_SONY_BTF_PB463Z           202