hal/gonk/tavarua.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 #ifndef __LINUX_TAVARUA_H
michael@0 2 #define __LINUX_TAVARUA_H
michael@0 3
michael@0 4 /* This is a Linux header generated by "make headers_install" */
michael@0 5
michael@0 6 #include <stdint.h>
michael@0 7 #include <linux/ioctl.h>
michael@0 8 #include <linux/videodev2.h>
michael@0 9
michael@0 10
michael@0 11 #undef FM_DEBUG
michael@0 12
michael@0 13 /* constants */
michael@0 14 #define RDS_BLOCKS_NUM (4)
michael@0 15 #define BYTES_PER_BLOCK (3)
michael@0 16 #define MAX_PS_LENGTH (96)
michael@0 17 #define MAX_RT_LENGTH (64)
michael@0 18
michael@0 19 #define XFRDAT0 (0x20)
michael@0 20 #define XFRDAT1 (0x21)
michael@0 21 #define XFRDAT2 (0x22)
michael@0 22
michael@0 23 #define INTDET_PEEK_MSB (0x88)
michael@0 24 #define INTDET_PEEK_LSB (0x26)
michael@0 25
michael@0 26 #define RMSSI_PEEK_MSB (0x88)
michael@0 27 #define RMSSI_PEEK_LSB (0xA8)
michael@0 28
michael@0 29 #define MPX_DCC_BYPASS_POKE_MSB (0x88)
michael@0 30 #define MPX_DCC_BYPASS_POKE_LSB (0xC0)
michael@0 31
michael@0 32 #define MPX_DCC_PEEK_MSB_REG1 (0x88)
michael@0 33 #define MPX_DCC_PEEK_LSB_REG1 (0xC2)
michael@0 34
michael@0 35 #define MPX_DCC_PEEK_MSB_REG2 (0x88)
michael@0 36 #define MPX_DCC_PEEK_LSB_REG2 (0xC3)
michael@0 37
michael@0 38 #define MPX_DCC_PEEK_MSB_REG3 (0x88)
michael@0 39 #define MPX_DCC_PEEK_LSB_REG3 (0xC4)
michael@0 40
michael@0 41 #define ON_CHANNEL_TH_MSB (0x0B)
michael@0 42 #define ON_CHANNEL_TH_LSB (0xA8)
michael@0 43
michael@0 44 #define OFF_CHANNEL_TH_MSB (0x0B)
michael@0 45 #define OFF_CHANNEL_TH_LSB (0xAC)
michael@0 46
michael@0 47 #define ENF_200Khz (1)
michael@0 48 #define SRCH200KHZ_OFFSET (7)
michael@0 49 #define SRCH_MASK (1 << SRCH200KHZ_OFFSET)
michael@0 50
michael@0 51 /* Standard buffer size */
michael@0 52 #define STD_BUF_SIZE (128)
michael@0 53 /* Search direction */
michael@0 54 #define SRCH_DIR_UP (0)
michael@0 55 #define SRCH_DIR_DOWN (1)
michael@0 56
michael@0 57 /* control options */
michael@0 58 #define CTRL_ON (1)
michael@0 59 #define CTRL_OFF (0)
michael@0 60
michael@0 61 #define US_LOW_BAND (87.5)
michael@0 62 #define US_HIGH_BAND (108)
michael@0 63
michael@0 64 /* constant for Tx */
michael@0 65
michael@0 66 #define MASK_PI (0x0000FFFF)
michael@0 67 #define MASK_PI_MSB (0x0000FF00)
michael@0 68 #define MASK_PI_LSB (0x000000FF)
michael@0 69 #define MASK_PTY (0x0000001F)
michael@0 70 #define MASK_TXREPCOUNT (0x0000000F)
michael@0 71
michael@0 72 #undef FMDBG
michael@0 73 #ifdef FM_DEBUG
michael@0 74 #define FMDBG(fmt, args...) printk(KERN_INFO "tavarua_radio: " fmt, ##args)
michael@0 75 #else
michael@0 76 #define FMDBG(fmt, args...)
michael@0 77 #endif
michael@0 78
michael@0 79 #undef FMDERR
michael@0 80 #define FMDERR(fmt, args...) printk(KERN_INFO "tavarua_radio: " fmt, ##args)
michael@0 81
michael@0 82 #undef FMDBG_I2C
michael@0 83 #ifdef FM_DEBUG_I2C
michael@0 84 #define FMDBG_I2C(fmt, args...) printk(KERN_INFO "fm_i2c: " fmt, ##args)
michael@0 85 #else
michael@0 86 #define FMDBG_I2C(fmt, args...)
michael@0 87 #endif
michael@0 88
michael@0 89 /* function declarations */
michael@0 90 /* FM Core audio paths. */
michael@0 91 #define TAVARUA_AUDIO_OUT_ANALOG_OFF (0)
michael@0 92 #define TAVARUA_AUDIO_OUT_ANALOG_ON (1)
michael@0 93 #define TAVARUA_AUDIO_OUT_DIGITAL_OFF (0)
michael@0 94 #define TAVARUA_AUDIO_OUT_DIGITAL_ON (1)
michael@0 95
michael@0 96 int tavarua_set_audio_path(int digital_on, int analog_on);
michael@0 97
michael@0 98 /* defines and enums*/
michael@0 99
michael@0 100 #define MARIMBA_A0 0x01010013
michael@0 101 #define MARIMBA_2_1 0x02010204
michael@0 102 #define BAHAMA_1_0 0x0302010A
michael@0 103 #define BAHAMA_2_0 0x04020205
michael@0 104 #define WAIT_TIMEOUT 2000
michael@0 105 #define RADIO_INIT_TIME 15
michael@0 106 #define TAVARUA_DELAY 10
michael@0 107 /*
michael@0 108 * The frequency is set in units of 62.5 Hz when using V4L2_TUNER_CAP_LOW,
michael@0 109 * 62.5 kHz otherwise.
michael@0 110 * The tuner is able to have a channel spacing of 50, 100 or 200 kHz.
michael@0 111 * tuner->capability is therefore set to V4L2_TUNER_CAP_LOW
michael@0 112 * The FREQ_MUL is then: 1 MHz / 62.5 Hz = 16000
michael@0 113 */
michael@0 114 #define FREQ_MUL (1000000 / 62.5)
michael@0 115
michael@0 116 enum v4l2_cid_private_tavarua_t {
michael@0 117 V4L2_CID_PRIVATE_TAVARUA_SRCHMODE = (V4L2_CID_PRIVATE_BASE + 1),
michael@0 118 V4L2_CID_PRIVATE_TAVARUA_SCANDWELL,
michael@0 119 V4L2_CID_PRIVATE_TAVARUA_SRCHON,
michael@0 120 V4L2_CID_PRIVATE_TAVARUA_STATE,
michael@0 121 V4L2_CID_PRIVATE_TAVARUA_TRANSMIT_MODE,
michael@0 122 V4L2_CID_PRIVATE_TAVARUA_RDSGROUP_MASK,
michael@0 123 V4L2_CID_PRIVATE_TAVARUA_REGION,
michael@0 124 V4L2_CID_PRIVATE_TAVARUA_SIGNAL_TH,
michael@0 125 V4L2_CID_PRIVATE_TAVARUA_SRCH_PTY,
michael@0 126 V4L2_CID_PRIVATE_TAVARUA_SRCH_PI,
michael@0 127 V4L2_CID_PRIVATE_TAVARUA_SRCH_CNT,
michael@0 128 V4L2_CID_PRIVATE_TAVARUA_EMPHASIS,
michael@0 129 V4L2_CID_PRIVATE_TAVARUA_RDS_STD,
michael@0 130 V4L2_CID_PRIVATE_TAVARUA_SPACING,
michael@0 131 V4L2_CID_PRIVATE_TAVARUA_RDSON,
michael@0 132 V4L2_CID_PRIVATE_TAVARUA_RDSGROUP_PROC,
michael@0 133 V4L2_CID_PRIVATE_TAVARUA_LP_MODE,
michael@0 134 V4L2_CID_PRIVATE_TAVARUA_ANTENNA,
michael@0 135 V4L2_CID_PRIVATE_TAVARUA_RDSD_BUF,
michael@0 136 V4L2_CID_PRIVATE_TAVARUA_PSALL,
michael@0 137 /*v4l2 Tx controls*/
michael@0 138 V4L2_CID_PRIVATE_TAVARUA_TX_SETPSREPEATCOUNT,
michael@0 139 V4L2_CID_PRIVATE_TAVARUA_STOP_RDS_TX_PS_NAME,
michael@0 140 V4L2_CID_PRIVATE_TAVARUA_STOP_RDS_TX_RT,
michael@0 141 V4L2_CID_PRIVATE_TAVARUA_IOVERC,
michael@0 142 V4L2_CID_PRIVATE_TAVARUA_INTDET,
michael@0 143 V4L2_CID_PRIVATE_TAVARUA_MPX_DCC,
michael@0 144 V4L2_CID_PRIVATE_TAVARUA_AF_JUMP,
michael@0 145 V4L2_CID_PRIVATE_TAVARUA_RSSI_DELTA,
michael@0 146 V4L2_CID_PRIVATE_TAVARUA_HLSI,
michael@0 147
michael@0 148 /*
michael@0 149 * Here we have IOCTl's that are specific to IRIS
michael@0 150 * (V4L2_CID_PRIVATE_BASE + 0x1E to V4L2_CID_PRIVATE_BASE + 0x28)
michael@0 151 */
michael@0 152 V4L2_CID_PRIVATE_SOFT_MUTE,/* 0x800001E*/
michael@0 153 V4L2_CID_PRIVATE_RIVA_ACCS_ADDR,
michael@0 154 V4L2_CID_PRIVATE_RIVA_ACCS_LEN,
michael@0 155 V4L2_CID_PRIVATE_RIVA_PEEK,
michael@0 156 V4L2_CID_PRIVATE_RIVA_POKE,
michael@0 157 V4L2_CID_PRIVATE_SSBI_ACCS_ADDR,
michael@0 158 V4L2_CID_PRIVATE_SSBI_PEEK,
michael@0 159 V4L2_CID_PRIVATE_SSBI_POKE,
michael@0 160 V4L2_CID_PRIVATE_TX_TONE,
michael@0 161 V4L2_CID_PRIVATE_RDS_GRP_COUNTERS,
michael@0 162 V4L2_CID_PRIVATE_SET_NOTCH_FILTER,/* 0x8000028 */
michael@0 163
michael@0 164 V4L2_CID_PRIVATE_TAVARUA_SET_AUDIO_PATH,/* 0x8000029 */
michael@0 165 V4L2_CID_PRIVATE_TAVARUA_DO_CALIBRATION,/* 0x800002A : IRIS */
michael@0 166 V4L2_CID_PRIVATE_TAVARUA_SRCH_ALGORITHM,/* 0x800002B */
michael@0 167 V4L2_CID_PRIVATE_IRIS_GET_SINR, /* 0x800002C : IRIS */
michael@0 168 V4L2_CID_PRIVATE_INTF_LOW_THRESHOLD, /* 0x800002D */
michael@0 169 V4L2_CID_PRIVATE_INTF_HIGH_THRESHOLD, /* 0x800002E */
michael@0 170 V4L2_CID_PRIVATE_SINR_THRESHOLD, /* 0x800002F : IRIS */
michael@0 171 V4L2_CID_PRIVATE_SINR_SAMPLES, /* 0x8000030 : IRIS */
michael@0 172
michael@0 173 };
michael@0 174
michael@0 175 enum tavarua_buf_t {
michael@0 176 TAVARUA_BUF_SRCH_LIST,
michael@0 177 TAVARUA_BUF_EVENTS,
michael@0 178 TAVARUA_BUF_RT_RDS,
michael@0 179 TAVARUA_BUF_PS_RDS,
michael@0 180 TAVARUA_BUF_RAW_RDS,
michael@0 181 TAVARUA_BUF_AF_LIST,
michael@0 182 TAVARUA_BUF_MAX
michael@0 183 };
michael@0 184
michael@0 185 enum tavarua_xfr_t {
michael@0 186 TAVARUA_XFR_SYNC,
michael@0 187 TAVARUA_XFR_ERROR,
michael@0 188 TAVARUA_XFR_SRCH_LIST,
michael@0 189 TAVARUA_XFR_RT_RDS,
michael@0 190 TAVARUA_XFR_PS_RDS,
michael@0 191 TAVARUA_XFR_AF_LIST,
michael@0 192 TAVARUA_XFR_MAX
michael@0 193 };
michael@0 194
michael@0 195 enum channel_spacing {
michael@0 196 FM_CH_SPACE_200KHZ,
michael@0 197 FM_CH_SPACE_100KHZ,
michael@0 198 FM_CH_SPACE_50KHZ
michael@0 199 };
michael@0 200
michael@0 201 enum step_size {
michael@0 202 NO_SRCH200khz,
michael@0 203 ENF_SRCH200khz
michael@0 204 };
michael@0 205
michael@0 206 enum emphasis {
michael@0 207 EMP_75,
michael@0 208 EMP_50
michael@0 209 };
michael@0 210
michael@0 211 enum rds_std {
michael@0 212 RBDS_STD,
michael@0 213 RDS_STD
michael@0 214 };
michael@0 215
michael@0 216 /* offsets */
michael@0 217 #define RAW_RDS 0x0F
michael@0 218 #define RDS_BLOCK 3
michael@0 219
michael@0 220 /* registers*/
michael@0 221 #define MARIMBA_XO_BUFF_CNTRL 0x07
michael@0 222 #define RADIO_REGISTERS 0x30
michael@0 223 #define XFR_REG_NUM 16
michael@0 224 #define STATUS_REG_NUM 3
michael@0 225
michael@0 226 /* TX constants */
michael@0 227 #define HEADER_SIZE 4
michael@0 228 #define TX_ON 0x80
michael@0 229 #define TAVARUA_TX_RT RDS_RT_0
michael@0 230 #define TAVARUA_TX_PS RDS_PS_0
michael@0 231
michael@0 232 enum register_t {
michael@0 233 STATUS_REG1 = 0,
michael@0 234 STATUS_REG2,
michael@0 235 STATUS_REG3,
michael@0 236 RDCTRL,
michael@0 237 FREQ,
michael@0 238 TUNECTRL,
michael@0 239 SRCHRDS1,
michael@0 240 SRCHRDS2,
michael@0 241 SRCHCTRL,
michael@0 242 IOCTRL,
michael@0 243 RDSCTRL,
michael@0 244 ADVCTRL,
michael@0 245 AUDIOCTRL,
michael@0 246 RMSSI,
michael@0 247 IOVERC,
michael@0 248 AUDIOIND = 0x1E,
michael@0 249 XFRCTRL,
michael@0 250 FM_CTL0 = 0xFF,
michael@0 251 LEAKAGE_CNTRL = 0xFE,
michael@0 252 };
michael@0 253 #define BAHAMA_RBIAS_CTL1 0x07
michael@0 254 #define BAHAMA_FM_MODE_REG 0xFD
michael@0 255 #define BAHAMA_FM_CTL1_REG 0xFE
michael@0 256 #define BAHAMA_FM_CTL0_REG 0xFF
michael@0 257 #define BAHAMA_FM_MODE_NORMAL 0x00
michael@0 258 #define BAHAMA_LDO_DREG_CTL0 0xF0
michael@0 259 #define BAHAMA_LDO_AREG_CTL0 0xF4
michael@0 260
michael@0 261 /* Radio Control */
michael@0 262 #define RDCTRL_STATE_OFFSET 0
michael@0 263 #define RDCTRL_STATE_MASK (3 << RDCTRL_STATE_OFFSET)
michael@0 264 #define RDCTRL_BAND_OFFSET 2
michael@0 265 #define RDCTRL_BAND_MASK (1 << RDCTRL_BAND_OFFSET)
michael@0 266 #define RDCTRL_CHSPACE_OFFSET 3
michael@0 267 #define RDCTRL_CHSPACE_MASK (3 << RDCTRL_CHSPACE_OFFSET)
michael@0 268 #define RDCTRL_DEEMPHASIS_OFFSET 5
michael@0 269 #define RDCTRL_DEEMPHASIS_MASK (1 << RDCTRL_DEEMPHASIS_OFFSET)
michael@0 270 #define RDCTRL_HLSI_OFFSET 6
michael@0 271 #define RDCTRL_HLSI_MASK (3 << RDCTRL_HLSI_OFFSET)
michael@0 272 #define RDSAF_OFFSET 6
michael@0 273 #define RDSAF_MASK (1 << RDSAF_OFFSET)
michael@0 274
michael@0 275 /* Tune Control */
michael@0 276 #define TUNE_STATION 0x01
michael@0 277 #define ADD_OFFSET (1 << 1)
michael@0 278 #define SIGSTATE (1 << 5)
michael@0 279 #define MOSTSTATE (1 << 6)
michael@0 280 #define RDSSYNC (1 << 7)
michael@0 281 /* Search Control */
michael@0 282 #define SRCH_MODE_OFFSET 0
michael@0 283 #define SRCH_MODE_MASK (7 << SRCH_MODE_OFFSET)
michael@0 284 #define SRCH_DIR_OFFSET 3
michael@0 285 #define SRCH_DIR_MASK (1 << SRCH_DIR_OFFSET)
michael@0 286 #define SRCH_DWELL_OFFSET 4
michael@0 287 #define SRCH_DWELL_MASK (7 << SRCH_DWELL_OFFSET)
michael@0 288 #define SRCH_STATE_OFFSET 7
michael@0 289 #define SRCH_STATE_MASK (1 << SRCH_STATE_OFFSET)
michael@0 290
michael@0 291 /* I/O Control */
michael@0 292 #define IOC_HRD_MUTE 0x03
michael@0 293 #define IOC_SFT_MUTE (1 << 2)
michael@0 294 #define IOC_MON_STR (1 << 3)
michael@0 295 #define IOC_SIG_BLND (1 << 4)
michael@0 296 #define IOC_INTF_BLND (1 << 5)
michael@0 297 #define IOC_ANTENNA (1 << 6)
michael@0 298 #define IOC_ANTENNA_OFFSET 6
michael@0 299 #define IOC_ANTENNA_MASK (1 << IOC_ANTENNA_OFFSET)
michael@0 300
michael@0 301 /* RDS Control */
michael@0 302 #define RDS_ON 0x01
michael@0 303 #define RDSCTRL_STANDARD_OFFSET 1
michael@0 304 #define RDSCTRL_STANDARD_MASK (1 << RDSCTRL_STANDARD_OFFSET)
michael@0 305
michael@0 306 /* Advanced features controls */
michael@0 307 #define RDSRTEN (1 << 3)
michael@0 308 #define RDSPSEN (1 << 4)
michael@0 309
michael@0 310 /* Audio path control */
michael@0 311 #define AUDIORX_ANALOG_OFFSET 0
michael@0 312 #define AUDIORX_ANALOG_MASK (1 << AUDIORX_ANALOG_OFFSET)
michael@0 313 #define AUDIORX_DIGITAL_OFFSET 1
michael@0 314 #define AUDIORX_DIGITAL_MASK (1 << AUDIORX_DIGITAL_OFFSET)
michael@0 315 #define AUDIOTX_OFFSET 2
michael@0 316 #define AUDIOTX_MASK (1 << AUDIOTX_OFFSET)
michael@0 317 #define I2SCTRL_OFFSET 3
michael@0 318 #define I2SCTRL_MASK (1 << I2SCTRL_OFFSET)
michael@0 319
michael@0 320 /* Search options */
michael@0 321 enum search_t {
michael@0 322 SEEK,
michael@0 323 SCAN,
michael@0 324 SCAN_FOR_STRONG,
michael@0 325 SCAN_FOR_WEAK,
michael@0 326 RDS_SEEK_PTY,
michael@0 327 RDS_SCAN_PTY,
michael@0 328 RDS_SEEK_PI,
michael@0 329 RDS_AF_JUMP,
michael@0 330 };
michael@0 331
michael@0 332 enum audio_path {
michael@0 333 FM_DIGITAL_PATH,
michael@0 334 FM_ANALOG_PATH
michael@0 335 };
michael@0 336 #define SRCH_MODE 0x07
michael@0 337 #define SRCH_DIR 0x08 /* 0-up 1-down */
michael@0 338 #define SCAN_DWELL 0x70
michael@0 339 #define SRCH_ON 0x80
michael@0 340
michael@0 341 /* RDS CONFIG */
michael@0 342 #define RDS_CONFIG_PSALL 0x01
michael@0 343
michael@0 344 #define FM_ENABLE 0x22
michael@0 345 #define SET_REG_FIELD(reg, val, offset, mask) \
michael@0 346 (reg = (reg & ~mask) | (((val) << offset) & mask))
michael@0 347 #define GET_REG_FIELD(reg, offset, mask) ((reg & mask) >> offset)
michael@0 348 #define RSH_DATA(val, offset) ((val) >> (offset))
michael@0 349 #define LSH_DATA(val, offset) ((val) << (offset))
michael@0 350 #define GET_ABS_VAL(val) ((val) & (0xFF))
michael@0 351
michael@0 352 enum radio_state_t {
michael@0 353 FM_OFF,
michael@0 354 FM_RECV,
michael@0 355 FM_TRANS,
michael@0 356 FM_RESET,
michael@0 357 };
michael@0 358
michael@0 359 #define XFRCTRL_WRITE (1 << 7)
michael@0 360
michael@0 361 /* Interrupt status */
michael@0 362
michael@0 363 /* interrupt register 1 */
michael@0 364 #define READY (1 << 0) /* Radio ready after powerup or reset */
michael@0 365 #define TUNE (1 << 1) /* Tune completed */
michael@0 366 #define SEARCH (1 << 2) /* Search completed (read FREQ) */
michael@0 367 #define SCANNEXT (1 << 3) /* Scanning for next station */
michael@0 368 #define SIGNAL (1 << 4) /* Signal indicator change (read SIGSTATE) */
michael@0 369 #define INTF (1 << 5) /* Interference cnt has fallen outside range */
michael@0 370 #define SYNC (1 << 6) /* RDS sync state change (read RDSSYNC) */
michael@0 371 #define AUDIO (1 << 7) /* Audio Control indicator (read AUDIOIND) */
michael@0 372
michael@0 373 /* interrupt register 2 */
michael@0 374 #define RDSDAT (1 << 0) /* New unread RDS data group available */
michael@0 375 #define BLOCKB (1 << 1) /* Block-B match condition exists */
michael@0 376 #define PROGID (1 << 2) /* Block-A or Block-C matched stored PI value*/
michael@0 377 #define RDSPS (1 << 3) /* New RDS Program Service Table available */
michael@0 378 #define RDSRT (1 << 4) /* New RDS Radio Text available */
michael@0 379 #define RDSAF (1 << 5) /* New RDS AF List available */
michael@0 380 #define TXRDSDAT (1 << 6) /* Transmitted an RDS group */
michael@0 381 #define TXRDSDONE (1 << 7) /* RDS raw group one-shot transmit completed */
michael@0 382
michael@0 383 /* interrupt register 3 */
michael@0 384 #define TRANSFER (1 << 0) /* Data transfer (XFR) completed */
michael@0 385 #define RDSPROC (1 << 1) /* Dynamic RDS Processing complete */
michael@0 386 #define ERROR (1 << 7) /* Err occurred.Read code to determine cause */
michael@0 387
michael@0 388
michael@0 389 #define FM_TX_PWR_LVL_0 0 /* Lowest power lvl that can be set for Tx */
michael@0 390 #define FM_TX_PWR_LVL_MAX 7 /* Max power lvl for Tx */
michael@0 391 /* Transfer */
michael@0 392 enum tavarua_xfr_ctrl_t {
michael@0 393 RDS_PS_0 = 0x01,
michael@0 394 RDS_PS_1,
michael@0 395 RDS_PS_2,
michael@0 396 RDS_PS_3,
michael@0 397 RDS_PS_4,
michael@0 398 RDS_PS_5,
michael@0 399 RDS_PS_6,
michael@0 400 RDS_RT_0,
michael@0 401 RDS_RT_1,
michael@0 402 RDS_RT_2,
michael@0 403 RDS_RT_3,
michael@0 404 RDS_RT_4,
michael@0 405 RDS_AF_0,
michael@0 406 RDS_AF_1,
michael@0 407 RDS_CONFIG,
michael@0 408 RDS_TX_GROUPS,
michael@0 409 RDS_COUNT_0,
michael@0 410 RDS_COUNT_1,
michael@0 411 RDS_COUNT_2,
michael@0 412 RADIO_CONFIG,
michael@0 413 RX_CONFIG,
michael@0 414 RX_TIMERS,
michael@0 415 RX_STATIONS_0,
michael@0 416 RX_STATIONS_1,
michael@0 417 INT_CTRL,
michael@0 418 ERROR_CODE,
michael@0 419 CHIPID,
michael@0 420 CAL_DAT_0 = 0x20,
michael@0 421 CAL_DAT_1,
michael@0 422 CAL_DAT_2,
michael@0 423 CAL_DAT_3,
michael@0 424 CAL_CFG_0,
michael@0 425 CAL_CFG_1,
michael@0 426 DIG_INTF_0,
michael@0 427 DIG_INTF_1,
michael@0 428 DIG_AGC_0,
michael@0 429 DIG_AGC_1,
michael@0 430 DIG_AGC_2,
michael@0 431 DIG_AUDIO_0,
michael@0 432 DIG_AUDIO_1,
michael@0 433 DIG_AUDIO_2,
michael@0 434 DIG_AUDIO_3,
michael@0 435 DIG_AUDIO_4,
michael@0 436 DIG_RXRDS,
michael@0 437 DIG_DCC,
michael@0 438 DIG_SPUR,
michael@0 439 DIG_MPXDCC,
michael@0 440 DIG_PILOT,
michael@0 441 DIG_DEMOD,
michael@0 442 DIG_MOST,
michael@0 443 DIG_TX_0,
michael@0 444 DIG_TX_1,
michael@0 445 PHY_TXGAIN = 0x3B,
michael@0 446 PHY_CONFIG,
michael@0 447 PHY_TXBLOCK,
michael@0 448 PHY_TCB,
michael@0 449 XFR_PEEK_MODE = 0x40,
michael@0 450 XFR_POKE_MODE = 0xC0,
michael@0 451 TAVARUA_XFR_CTRL_MAX
michael@0 452 };
michael@0 453
michael@0 454 enum tavarua_evt_t {
michael@0 455 TAVARUA_EVT_RADIO_READY,
michael@0 456 TAVARUA_EVT_TUNE_SUCC,
michael@0 457 TAVARUA_EVT_SEEK_COMPLETE,
michael@0 458 TAVARUA_EVT_SCAN_NEXT,
michael@0 459 TAVARUA_EVT_NEW_RAW_RDS,
michael@0 460 TAVARUA_EVT_NEW_RT_RDS,
michael@0 461 TAVARUA_EVT_NEW_PS_RDS,
michael@0 462 TAVARUA_EVT_ERROR,
michael@0 463 TAVARUA_EVT_BELOW_TH,
michael@0 464 TAVARUA_EVT_ABOVE_TH,
michael@0 465 TAVARUA_EVT_STEREO,
michael@0 466 TAVARUA_EVT_MONO,
michael@0 467 TAVARUA_EVT_RDS_AVAIL,
michael@0 468 TAVARUA_EVT_RDS_NOT_AVAIL,
michael@0 469 TAVARUA_EVT_NEW_SRCH_LIST,
michael@0 470 TAVARUA_EVT_NEW_AF_LIST,
michael@0 471 TAVARUA_EVT_TXRDSDAT,
michael@0 472 TAVARUA_EVT_TXRDSDONE,
michael@0 473 TAVARUA_EVT_RADIO_DISABLED
michael@0 474 };
michael@0 475
michael@0 476 enum tavarua_region_t {
michael@0 477 TAVARUA_REGION_US,
michael@0 478 TAVARUA_REGION_EU,
michael@0 479 TAVARUA_REGION_JAPAN,
michael@0 480 TAVARUA_REGION_JAPAN_WIDE,
michael@0 481 TAVARUA_REGION_OTHER
michael@0 482 };
michael@0 483
michael@0 484 #endif /* __LINUX_TAVARUA_H */

mercurial