2 * Driver for the Auvitek USB bridge
4 * Copyright (c) 2008 Steven Toth <stoth@linuxtv.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
18 /* We'll start to rename these registers once we have a better
19 * understanding of their meaning.
26 #define AU0828_SENSORCTRL_100 0x100
27 #define AU0828_SENSORCTRL_VBI_103 0x103
30 #define AU0828_I2C_TRIGGER_200 0x200
31 #define AU0828_I2C_STATUS_201 0x201
32 #define AU0828_I2C_CLK_DIVIDER_202 0x202
33 #define AU0828_I2C_DEST_ADDR_203 0x203
34 #define AU0828_I2C_WRITE_FIFO_205 0x205
35 #define AU0828_I2C_READ_FIFO_209 0x209
36 #define AU0828_I2C_MULTIBYTE_MODE_2FF 0x2ff
39 #define AU0828_AUDIOCTRL_50C 0x50C
43 /*********************************************************************/
44 /* Here are constants for values associated with the above registers */
46 /* I2C Trigger (Reg 0x200) */
47 #define AU0828_I2C_TRIGGER_WRITE 0x01
48 #define AU0828_I2C_TRIGGER_READ 0x20
49 #define AU0828_I2C_TRIGGER_HOLD 0x40
51 /* I2C Status (Reg 0x201) */
52 #define AU0828_I2C_STATUS_READ_DONE 0x01
53 #define AU0828_I2C_STATUS_NO_READ_ACK 0x02
54 #define AU0828_I2C_STATUS_WRITE_DONE 0x04
55 #define AU0828_I2C_STATUS_NO_WRITE_ACK 0x08
56 #define AU0828_I2C_STATUS_BUSY 0x10
58 /* I2C Clock Divider (Reg 0x202) */
59 #define AU0828_I2C_CLK_250KHZ 0x07
60 #define AU0828_I2C_CLK_100KHZ 0x14
61 #define AU0828_I2C_CLK_30KHZ 0x40
62 #define AU0828_I2C_CLK_20KHZ 0x60