#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 <media/dvb_frontend.h>
#include "si21xx.h"
#define REVISION_REG …
#define SYSTEM_MODE_REG …
#define TS_CTRL_REG_1 …
#define TS_CTRL_REG_2 …
#define PIN_CTRL_REG_1 …
#define PIN_CTRL_REG_2 …
#define LOCK_STATUS_REG_1 …
#define LOCK_STATUS_REG_2 …
#define ACQ_STATUS_REG …
#define ACQ_CTRL_REG_1 …
#define ACQ_CTRL_REG_2 …
#define PLL_DIVISOR_REG …
#define COARSE_TUNE_REG …
#define FINE_TUNE_REG_L …
#define FINE_TUNE_REG_H …
#define ANALOG_AGC_POWER_LEVEL_REG …
#define CFO_ESTIMATOR_CTRL_REG_1 …
#define CFO_ESTIMATOR_CTRL_REG_2 …
#define CFO_ESTIMATOR_CTRL_REG_3 …
#define SYM_RATE_ESTIMATE_REG_L …
#define SYM_RATE_ESTIMATE_REG_M …
#define SYM_RATE_ESTIMATE_REG_H …
#define CFO_ESTIMATOR_OFFSET_REG_L …
#define CFO_ESTIMATOR_OFFSET_REG_H …
#define CFO_ERROR_REG_L …
#define CFO_ERROR_REG_H …
#define SYM_RATE_ESTIMATOR_CTRL_REG …
#define SYM_RATE_REG_L …
#define SYM_RATE_REG_M …
#define SYM_RATE_REG_H …
#define SYM_RATE_ESTIMATOR_MAXIMUM_REG …
#define SYM_RATE_ESTIMATOR_MINIMUM_REG …
#define C_N_ESTIMATOR_CTRL_REG …
#define C_N_ESTIMATOR_THRSHLD_REG …
#define C_N_ESTIMATOR_LEVEL_REG_L …
#define C_N_ESTIMATOR_LEVEL_REG_H …
#define BLIND_SCAN_CTRL_REG …
#define LSA_CTRL_REG_1 …
#define SPCTRM_TILT_CORR_THRSHLD_REG …
#define ONE_DB_BNDWDTH_THRSHLD_REG …
#define TWO_DB_BNDWDTH_THRSHLD_REG …
#define THREE_DB_BNDWDTH_THRSHLD_REG …
#define INBAND_POWER_THRSHLD_REG …
#define REF_NOISE_LVL_MRGN_THRSHLD_REG …
#define VIT_SRCH_CTRL_REG_1 …
#define VIT_SRCH_CTRL_REG_2 …
#define VIT_SRCH_CTRL_REG_3 …
#define VIT_SRCH_STATUS_REG …
#define VITERBI_BER_COUNT_REG_L …
#define REED_SOLOMON_CTRL_REG …
#define REED_SOLOMON_ERROR_COUNT_REG_L …
#define PRBS_CTRL_REG …
#define LNB_CTRL_REG_1 …
#define LNB_CTRL_REG_2 …
#define LNB_CTRL_REG_3 …
#define LNB_CTRL_REG_4 …
#define LNB_CTRL_STATUS_REG …
#define LNB_FIFO_REGS_0 …
#define LNB_FIFO_REGS_1 …
#define LNB_FIFO_REGS_2 …
#define LNB_FIFO_REGS_3 …
#define LNB_FIFO_REGS_4 …
#define LNB_FIFO_REGS_5 …
#define LNB_SUPPLY_CTRL_REG_1 …
#define LNB_SUPPLY_CTRL_REG_2 …
#define LNB_SUPPLY_CTRL_REG_3 …
#define LNB_SUPPLY_CTRL_REG_4 …
#define LNB_SUPPLY_STATUS_REG …
#define FAIL …
#define PASS …
#define ALLOWABLE_FS_COUNT …
#define STATUS_BER …
#define STATUS_UCBLOCKS …
static int debug;
#define dprintk(args...) …
enum { … };
enum { … };
enum { … };
enum { … };
enum { … };
enum { … };
struct si21xx_state { … };
static u8 serit_sp1511lhb_inittab[] = …;
static int si21_writeregs(struct si21xx_state *state, u8 reg1,
u8 *data, int len)
{ … }
static int si21_writereg(struct si21xx_state *state, u8 reg, u8 data)
{ … }
static int si21_write(struct dvb_frontend *fe, const u8 buf[], int len)
{ … }
static u8 si21_readreg(struct si21xx_state *state, u8 reg)
{ … }
static int si21_readregs(struct si21xx_state *state, u8 reg1, u8 *b, u8 len)
{ … }
static int si21xx_wait_diseqc_idle(struct si21xx_state *state, int timeout)
{ … }
static int si21xx_set_symbolrate(struct dvb_frontend *fe, u32 srate)
{ … }
static int si21xx_send_diseqc_msg(struct dvb_frontend *fe,
struct dvb_diseqc_master_cmd *m)
{ … }
static int si21xx_send_diseqc_burst(struct dvb_frontend *fe,
enum fe_sec_mini_cmd burst)
{ … }
static int si21xx_set_tone(struct dvb_frontend *fe, enum fe_sec_tone_mode tone)
{ … }
static int si21xx_set_voltage(struct dvb_frontend *fe, enum fe_sec_voltage volt)
{ … }
static int si21xx_init(struct dvb_frontend *fe)
{ … }
static int si21_read_status(struct dvb_frontend *fe, enum fe_status *status)
{ … }
static int si21_read_signal_strength(struct dvb_frontend *fe, u16 *strength)
{ … }
static int si21_read_ber(struct dvb_frontend *fe, u32 *ber)
{ … }
static int si21_read_snr(struct dvb_frontend *fe, u16 *snr)
{ … }
static int si21_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks)
{ … }
static int si21xx_setacquire(struct dvb_frontend *fe, int symbrate,
enum fe_code_rate crate)
{ … }
static int si21xx_set_frontend(struct dvb_frontend *fe)
{ … }
static int si21xx_sleep(struct dvb_frontend *fe)
{ … }
static void si21xx_release(struct dvb_frontend *fe)
{ … }
static const struct dvb_frontend_ops si21xx_ops = …;
struct dvb_frontend *si21xx_attach(const struct si21xx_config *config,
struct i2c_adapter *i2c)
{ … }
EXPORT_SYMBOL_GPL(…);
module_param(debug, int, 0644);
MODULE_PARM_DESC(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;