Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  *  Driver for the Auvitek USB bridge
0004  *
0005  *  Copyright (c) 2008 Steven Toth <stoth@linuxtv.org>
0006  */
0007 
0008 /* We'll start to rename these registers once we have a better
0009  * understanding of their meaning.
0010  */
0011 #define REG_000 0x000
0012 #define REG_001 0x001
0013 #define REG_002 0x002
0014 #define REG_003 0x003
0015 
0016 #define AU0828_SENSORCTRL_100 0x100
0017 #define AU0828_SENSORCTRL_VBI_103 0x103
0018 
0019 /* I2C registers */
0020 #define AU0828_I2C_TRIGGER_200      0x200
0021 #define AU0828_I2C_STATUS_201       0x201
0022 #define AU0828_I2C_CLK_DIVIDER_202  0x202
0023 #define AU0828_I2C_DEST_ADDR_203    0x203
0024 #define AU0828_I2C_WRITE_FIFO_205   0x205
0025 #define AU0828_I2C_READ_FIFO_209    0x209
0026 #define AU0828_I2C_MULTIBYTE_MODE_2FF   0x2ff
0027 
0028 /* Audio registers */
0029 #define AU0828_AUDIOCTRL_50C 0x50C
0030 
0031 #define REG_600 0x600
0032 
0033 /*********************************************************************/
0034 /* Here are constants for values associated with the above registers */
0035 
0036 /* I2C Trigger (Reg 0x200) */
0037 #define AU0828_I2C_TRIGGER_WRITE    0x01
0038 #define AU0828_I2C_TRIGGER_READ     0x20
0039 #define AU0828_I2C_TRIGGER_HOLD     0x40
0040 
0041 /* I2C Status (Reg 0x201) */
0042 #define AU0828_I2C_STATUS_READ_DONE 0x01
0043 #define AU0828_I2C_STATUS_NO_READ_ACK   0x02
0044 #define AU0828_I2C_STATUS_WRITE_DONE    0x04
0045 #define AU0828_I2C_STATUS_NO_WRITE_ACK  0x08
0046 #define AU0828_I2C_STATUS_BUSY      0x10
0047 
0048 /* I2C Clock Divider (Reg 0x202) */
0049 #define AU0828_I2C_CLK_250KHZ 0x07
0050 #define AU0828_I2C_CLK_100KHZ 0x14
0051 #define AU0828_I2C_CLK_30KHZ  0x40
0052 #define AU0828_I2C_CLK_20KHZ  0x60