Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
si21xx.c File Reference
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/string.h>
#include <linux/slab.h>
#include <linux/jiffies.h>
#include <asm/div64.h>
#include "dvb_frontend.h"
#include "si21xx.h"

Go to the source code of this file.

Data Structures

struct  si21xx_state
 

Macros

#define REVISION_REG   0x00
 
#define SYSTEM_MODE_REG   0x01
 
#define TS_CTRL_REG_1   0x02
 
#define TS_CTRL_REG_2   0x03
 
#define PIN_CTRL_REG_1   0x04
 
#define PIN_CTRL_REG_2   0x05
 
#define LOCK_STATUS_REG_1   0x0f
 
#define LOCK_STATUS_REG_2   0x10
 
#define ACQ_STATUS_REG   0x11
 
#define ACQ_CTRL_REG_1   0x13
 
#define ACQ_CTRL_REG_2   0x14
 
#define PLL_DIVISOR_REG   0x15
 
#define COARSE_TUNE_REG   0x16
 
#define FINE_TUNE_REG_L   0x17
 
#define FINE_TUNE_REG_H   0x18
 
#define ANALOG_AGC_POWER_LEVEL_REG   0x28
 
#define CFO_ESTIMATOR_CTRL_REG_1   0x29
 
#define CFO_ESTIMATOR_CTRL_REG_2   0x2a
 
#define CFO_ESTIMATOR_CTRL_REG_3   0x2b
 
#define SYM_RATE_ESTIMATE_REG_L   0x31
 
#define SYM_RATE_ESTIMATE_REG_M   0x32
 
#define SYM_RATE_ESTIMATE_REG_H   0x33
 
#define CFO_ESTIMATOR_OFFSET_REG_L   0x36
 
#define CFO_ESTIMATOR_OFFSET_REG_H   0x37
 
#define CFO_ERROR_REG_L   0x38
 
#define CFO_ERROR_REG_H   0x39
 
#define SYM_RATE_ESTIMATOR_CTRL_REG   0x3a
 
#define SYM_RATE_REG_L   0x3f
 
#define SYM_RATE_REG_M   0x40
 
#define SYM_RATE_REG_H   0x41
 
#define SYM_RATE_ESTIMATOR_MAXIMUM_REG   0x42
 
#define SYM_RATE_ESTIMATOR_MINIMUM_REG   0x43
 
#define C_N_ESTIMATOR_CTRL_REG   0x7c
 
#define C_N_ESTIMATOR_THRSHLD_REG   0x7d
 
#define C_N_ESTIMATOR_LEVEL_REG_L   0x7e
 
#define C_N_ESTIMATOR_LEVEL_REG_H   0x7f
 
#define BLIND_SCAN_CTRL_REG   0x80
 
#define LSA_CTRL_REG_1   0x8D
 
#define SPCTRM_TILT_CORR_THRSHLD_REG   0x8f
 
#define ONE_DB_BNDWDTH_THRSHLD_REG   0x90
 
#define TWO_DB_BNDWDTH_THRSHLD_REG   0x91
 
#define THREE_DB_BNDWDTH_THRSHLD_REG   0x92
 
#define INBAND_POWER_THRSHLD_REG   0x93
 
#define REF_NOISE_LVL_MRGN_THRSHLD_REG   0x94
 
#define VIT_SRCH_CTRL_REG_1   0xa0
 
#define VIT_SRCH_CTRL_REG_2   0xa1
 
#define VIT_SRCH_CTRL_REG_3   0xa2
 
#define VIT_SRCH_STATUS_REG   0xa3
 
#define VITERBI_BER_COUNT_REG_L   0xab
 
#define REED_SOLOMON_CTRL_REG   0xb0
 
#define REED_SOLOMON_ERROR_COUNT_REG_L   0xb1
 
#define PRBS_CTRL_REG   0xb5
 
#define LNB_CTRL_REG_1   0xc0
 
#define LNB_CTRL_REG_2   0xc1
 
#define LNB_CTRL_REG_3   0xc2
 
#define LNB_CTRL_REG_4   0xc3
 
#define LNB_CTRL_STATUS_REG   0xc4
 
#define LNB_FIFO_REGS_0   0xc5
 
#define LNB_FIFO_REGS_1   0xc6
 
#define LNB_FIFO_REGS_2   0xc7
 
#define LNB_FIFO_REGS_3   0xc8
 
#define LNB_FIFO_REGS_4   0xc9
 
#define LNB_FIFO_REGS_5   0xca
 
#define LNB_SUPPLY_CTRL_REG_1   0xcb
 
#define LNB_SUPPLY_CTRL_REG_2   0xcc
 
#define LNB_SUPPLY_CTRL_REG_3   0xcd
 
#define LNB_SUPPLY_CTRL_REG_4   0xce
 
#define LNB_SUPPLY_STATUS_REG   0xcf
 
#define FAIL   -1
 
#define PASS   0
 
#define ALLOWABLE_FS_COUNT   10
 
#define STATUS_BER   0
 
#define STATUS_UCBLOCKS   1
 
#define dprintk(args...)
 

Enumerations

enum  { ACTIVE_HIGH, ACTIVE_LOW }
 
enum  { BYTE_WIDE, BIT_WIDE }
 
enum  { CLK_GAPPED_MODE, CLK_CONTINUOUS_MODE }
 
enum  { RISING_EDGE, FALLING_EDGE }
 
enum  { MSB_FIRST, LSB_FIRST }
 
enum  { SERIAL, PARALLEL }
 

Functions

struct dvb_frontendsi21xx_attach (const struct si21xx_config *config, struct i2c_adapter *i2c)
 
 EXPORT_SYMBOL (si21xx_attach)
 
 module_param (debug, int, 0644)
 
 MODULE_PARM_DESC (debug,"Turn on/off frontend debugging (default:off).")
 
 MODULE_DESCRIPTION ("SL SI21XX DVB Demodulator driver")
 
 MODULE_AUTHOR ("Igor M. Liplianin")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define ACQ_CTRL_REG_1   0x13

Definition at line 31 of file si21xx.c.

#define ACQ_CTRL_REG_2   0x14

Definition at line 32 of file si21xx.c.

#define ACQ_STATUS_REG   0x11

Definition at line 30 of file si21xx.c.

#define ALLOWABLE_FS_COUNT   10

Definition at line 103 of file si21xx.c.

#define ANALOG_AGC_POWER_LEVEL_REG   0x28

Definition at line 38 of file si21xx.c.

#define BLIND_SCAN_CTRL_REG   0x80

Definition at line 64 of file si21xx.c.

#define C_N_ESTIMATOR_CTRL_REG   0x7c

Definition at line 59 of file si21xx.c.

#define C_N_ESTIMATOR_LEVEL_REG_H   0x7f

Definition at line 62 of file si21xx.c.

#define C_N_ESTIMATOR_LEVEL_REG_L   0x7e

Definition at line 61 of file si21xx.c.

#define C_N_ESTIMATOR_THRSHLD_REG   0x7d

Definition at line 60 of file si21xx.c.

#define CFO_ERROR_REG_H   0x39

Definition at line 50 of file si21xx.c.

#define CFO_ERROR_REG_L   0x38

Definition at line 49 of file si21xx.c.

#define CFO_ESTIMATOR_CTRL_REG_1   0x29

Definition at line 39 of file si21xx.c.

#define CFO_ESTIMATOR_CTRL_REG_2   0x2a

Definition at line 40 of file si21xx.c.

#define CFO_ESTIMATOR_CTRL_REG_3   0x2b

Definition at line 41 of file si21xx.c.

#define CFO_ESTIMATOR_OFFSET_REG_H   0x37

Definition at line 48 of file si21xx.c.

#define CFO_ESTIMATOR_OFFSET_REG_L   0x36

Definition at line 47 of file si21xx.c.

#define COARSE_TUNE_REG   0x16

Definition at line 34 of file si21xx.c.

#define dprintk (   args...)
Value:
do { \
if (debug) \
printk(KERN_DEBUG "si21xx: " args); \
} while (0)

Definition at line 108 of file si21xx.c.

#define FAIL   -1

Definition at line 100 of file si21xx.c.

#define FINE_TUNE_REG_H   0x18

Definition at line 36 of file si21xx.c.

#define FINE_TUNE_REG_L   0x17

Definition at line 35 of file si21xx.c.

#define INBAND_POWER_THRSHLD_REG   0x93

Definition at line 71 of file si21xx.c.

#define LNB_CTRL_REG_1   0xc0

Definition at line 83 of file si21xx.c.

#define LNB_CTRL_REG_2   0xc1

Definition at line 84 of file si21xx.c.

#define LNB_CTRL_REG_3   0xc2

Definition at line 85 of file si21xx.c.

#define LNB_CTRL_REG_4   0xc3

Definition at line 86 of file si21xx.c.

#define LNB_CTRL_STATUS_REG   0xc4

Definition at line 87 of file si21xx.c.

#define LNB_FIFO_REGS_0   0xc5

Definition at line 88 of file si21xx.c.

#define LNB_FIFO_REGS_1   0xc6

Definition at line 89 of file si21xx.c.

#define LNB_FIFO_REGS_2   0xc7

Definition at line 90 of file si21xx.c.

#define LNB_FIFO_REGS_3   0xc8

Definition at line 91 of file si21xx.c.

#define LNB_FIFO_REGS_4   0xc9

Definition at line 92 of file si21xx.c.

#define LNB_FIFO_REGS_5   0xca

Definition at line 93 of file si21xx.c.

#define LNB_SUPPLY_CTRL_REG_1   0xcb

Definition at line 94 of file si21xx.c.

#define LNB_SUPPLY_CTRL_REG_2   0xcc

Definition at line 95 of file si21xx.c.

#define LNB_SUPPLY_CTRL_REG_3   0xcd

Definition at line 96 of file si21xx.c.

#define LNB_SUPPLY_CTRL_REG_4   0xce

Definition at line 97 of file si21xx.c.

#define LNB_SUPPLY_STATUS_REG   0xcf

Definition at line 98 of file si21xx.c.

#define LOCK_STATUS_REG_1   0x0f

Definition at line 28 of file si21xx.c.

#define LOCK_STATUS_REG_2   0x10

Definition at line 29 of file si21xx.c.

#define LSA_CTRL_REG_1   0x8D

Definition at line 66 of file si21xx.c.

#define ONE_DB_BNDWDTH_THRSHLD_REG   0x90

Definition at line 68 of file si21xx.c.

#define PASS   0

Definition at line 101 of file si21xx.c.

#define PIN_CTRL_REG_1   0x04

Definition at line 26 of file si21xx.c.

#define PIN_CTRL_REG_2   0x05

Definition at line 27 of file si21xx.c.

#define PLL_DIVISOR_REG   0x15

Definition at line 33 of file si21xx.c.

#define PRBS_CTRL_REG   0xb5

Definition at line 81 of file si21xx.c.

#define REED_SOLOMON_CTRL_REG   0xb0

Definition at line 79 of file si21xx.c.

#define REED_SOLOMON_ERROR_COUNT_REG_L   0xb1

Definition at line 80 of file si21xx.c.

#define REF_NOISE_LVL_MRGN_THRSHLD_REG   0x94

Definition at line 72 of file si21xx.c.

#define REVISION_REG   0x00

Definition at line 22 of file si21xx.c.

#define SPCTRM_TILT_CORR_THRSHLD_REG   0x8f

Definition at line 67 of file si21xx.c.

#define STATUS_BER   0

Definition at line 104 of file si21xx.c.

#define STATUS_UCBLOCKS   1

Definition at line 105 of file si21xx.c.

#define SYM_RATE_ESTIMATE_REG_H   0x33

Definition at line 45 of file si21xx.c.

#define SYM_RATE_ESTIMATE_REG_L   0x31

Definition at line 43 of file si21xx.c.

#define SYM_RATE_ESTIMATE_REG_M   0x32

Definition at line 44 of file si21xx.c.

#define SYM_RATE_ESTIMATOR_CTRL_REG   0x3a

Definition at line 51 of file si21xx.c.

#define SYM_RATE_ESTIMATOR_MAXIMUM_REG   0x42

Definition at line 56 of file si21xx.c.

#define SYM_RATE_ESTIMATOR_MINIMUM_REG   0x43

Definition at line 57 of file si21xx.c.

#define SYM_RATE_REG_H   0x41

Definition at line 55 of file si21xx.c.

#define SYM_RATE_REG_L   0x3f

Definition at line 53 of file si21xx.c.

#define SYM_RATE_REG_M   0x40

Definition at line 54 of file si21xx.c.

#define SYSTEM_MODE_REG   0x01

Definition at line 23 of file si21xx.c.

#define THREE_DB_BNDWDTH_THRSHLD_REG   0x92

Definition at line 70 of file si21xx.c.

#define TS_CTRL_REG_1   0x02

Definition at line 24 of file si21xx.c.

#define TS_CTRL_REG_2   0x03

Definition at line 25 of file si21xx.c.

#define TWO_DB_BNDWDTH_THRSHLD_REG   0x91

Definition at line 69 of file si21xx.c.

#define VIT_SRCH_CTRL_REG_1   0xa0

Definition at line 74 of file si21xx.c.

#define VIT_SRCH_CTRL_REG_2   0xa1

Definition at line 75 of file si21xx.c.

#define VIT_SRCH_CTRL_REG_3   0xa2

Definition at line 76 of file si21xx.c.

#define VIT_SRCH_STATUS_REG   0xa3

Definition at line 77 of file si21xx.c.

#define VITERBI_BER_COUNT_REG_L   0xab

Definition at line 78 of file si21xx.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
ACTIVE_HIGH 
ACTIVE_LOW 

Definition at line 114 of file si21xx.c.

anonymous enum
Enumerator:
BYTE_WIDE 
BIT_WIDE 

Definition at line 118 of file si21xx.c.

anonymous enum
Enumerator:
CLK_GAPPED_MODE 
CLK_CONTINUOUS_MODE 

Definition at line 122 of file si21xx.c.

anonymous enum
Enumerator:
RISING_EDGE 
FALLING_EDGE 

Definition at line 126 of file si21xx.c.

anonymous enum
Enumerator:
MSB_FIRST 
LSB_FIRST 

Definition at line 130 of file si21xx.c.

anonymous enum
Enumerator:
SERIAL 
PARALLEL 

Definition at line 134 of file si21xx.c.

Function Documentation

EXPORT_SYMBOL ( si21xx_attach  )
MODULE_AUTHOR ( "Igor M. Liplianin"  )
MODULE_DESCRIPTION ( "SL SI21XX DVB Demodulator driver )
MODULE_LICENSE ( "GPL"  )
module_param ( debug  ,
int  ,
0644   
)
MODULE_PARM_DESC ( debug  ,
"Turn on/off frontend debugging (default:off)."   
)
struct dvb_frontend* si21xx_attach ( const struct si21xx_config config,
struct i2c_adapter i2c 
)
read

Definition at line 900 of file si21xx.c.