2
Copyright (C) 2008 Mauro Carvalho Chehab <mchehab@infradead.org>
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation version 2 of the License.
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
#define EM28XX_IDENT "em28xx"
21
/* Register name prefix */
22
#define EM2800_PREFIX "EM2800_"
23
#define EM2874_PREFIX "EM2874_"
24
#define EM2880_PREFIX "EM2880_"
25
#define EM28XX_PREFIX "EM28XX_"
27
static struct board_regs em28xx_regs[] = {
28
{0x00, EM28XX_PREFIX "CHIPCFG", 1},
29
{0x04, EM2880_PREFIX "GPO", 1},
30
{0x08, EM28XX_PREFIX "GPIO", 1},
32
{0x06, EM28XX_PREFIX "I2C_CLK", 1},
33
{0x0a, EM28XX_PREFIX "CHIPID", 1},
34
{0x0c, EM28XX_PREFIX "USBSUSP", 1},
36
{0x0e, EM28XX_PREFIX "AUDIOSRC", 1},
37
{0x0f, EM28XX_PREFIX "XCLK", 1},
39
{0x10, EM28XX_PREFIX "VINMODE", 1},
40
{0x11, EM28XX_PREFIX "VINCTRL", 1},
41
{0x12, EM28XX_PREFIX "VINENABLE", 1},
43
{0x14, EM28XX_PREFIX "GAMMA", 1},
44
{0x15, EM28XX_PREFIX "RGAIN", 1},
45
{0x16, EM28XX_PREFIX "GGAIN", 1},
46
{0x17, EM28XX_PREFIX "BGAIN", 1},
47
{0x18, EM28XX_PREFIX "ROFFSET", 1},
48
{0x19, EM28XX_PREFIX "GOFFSET", 1},
49
{0x1a, EM28XX_PREFIX "BOFFSET", 1},
51
{0x1b, EM28XX_PREFIX "OFLOW", 1},
52
{0x1c, EM28XX_PREFIX "HSTART", 1},
53
{0x1d, EM28XX_PREFIX "VSTART", 1},
54
{0x1e, EM28XX_PREFIX "CWIDTH", 1},
55
{0x1f, EM28XX_PREFIX "CHEIGHT", 1},
57
{0x20, EM28XX_PREFIX "YGAIN", 1},
58
{0x21, EM28XX_PREFIX "YOFFSET", 1},
59
{0x22, EM28XX_PREFIX "UVGAIN", 1},
60
{0x23, EM28XX_PREFIX "UOFFSET", 1},
61
{0x24, EM28XX_PREFIX "VOFFSET", 1},
62
{0x25, EM28XX_PREFIX "SHARPNESS", 1},
64
{0x26, EM28XX_PREFIX "COMPR", 1},
65
{0x27, EM28XX_PREFIX "OUTFMT", 1},
67
{0x28, EM28XX_PREFIX "XMIN", 1},
68
{0x29, EM28XX_PREFIX "XMAX", 1},
69
{0x2a, EM28XX_PREFIX "YMIN", 1},
70
{0x2b, EM28XX_PREFIX "YMAX", 1},
72
{0x30, EM28XX_PREFIX "HSCALELOW", 1},
73
{0x31, EM28XX_PREFIX "HSCALEHIGH", 1},
74
{0x32, EM28XX_PREFIX "VSCALELOW", 1},
75
{0x33, EM28XX_PREFIX "VSCALEHIGH", 1},
77
{0x40, EM28XX_PREFIX "AC97LSB", 1},
78
{0x41, EM28XX_PREFIX "AC97MSB", 1},
79
{0x42, EM28XX_PREFIX "AC97ADDR", 1},
80
{0x43, EM28XX_PREFIX "AC97BUSY", 1},
82
{0x45, EM28XX_PREFIX "IR", 1},
84
{0x50, EM2874_PREFIX "IR_CONFIG", 1},
85
{0x51, EM2874_PREFIX "IR", 1},
86
{0x5f, EM2874_PREFIX "TS_ENABLE", 1},
87
{0x80, EM2874_PREFIX "GPIO", 1},
90
static struct board_regs em28xx_alt_regs[] = {
91
{0x08, EM2800_PREFIX "AUDIOSRC", 1},