#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/firmware.h>
#include <linux/i2c.h>
#include <asm/div64.h>
#include <media/dvb_frontend.h>
#include "stv0910.h"
#include "stv0910_regs.h"
#define EXT_CLOCK …
#define TUNING_DELAY …
#define BER_SRC_S …
#define BER_SRC_S2 …
static LIST_HEAD(stvlist);
enum receive_mode { … };
enum dvbs2_fectype { … };
enum dvbs2_mod_cod { … };
enum fe_stv0910_mod_cod { … };
enum fe_stv0910_roll_off { … };
static inline u32 muldiv32(u32 a, u32 b, u32 c)
{ … }
struct stv_base { … };
struct stv { … };
struct slookup { … };
static int write_reg(struct stv *state, u16 reg, u8 val)
{ … }
static inline int i2c_read_regs16(struct i2c_adapter *adapter, u8 adr,
u16 reg, u8 *val, int count)
{ … }
static int read_reg(struct stv *state, u16 reg, u8 *val)
{ … }
static int read_regs(struct stv *state, u16 reg, u8 *val, int len)
{ … }
static int write_shared_reg(struct stv *state, u16 reg, u8 mask, u8 val)
{ … }
static int write_field(struct stv *state, u32 field, u8 val)
{ … }
#define SET_FIELD(_reg, _val) …
#define SET_REG(_reg, _val) …
#define GET_REG(_reg, _val) …
static const struct slookup s1_sn_lookup[] = …;
static const struct slookup s2_sn_lookup[] = …;
static const struct slookup padc_lookup[] = …;
static const u8 s2car_loop[] = …;
static u8 get_optim_cloop(struct stv *state,
enum fe_stv0910_mod_cod mod_cod, u32 pilots)
{ … }
static int get_cur_symbol_rate(struct stv *state, u32 *p_symbol_rate)
{ … }
static int get_signal_parameters(struct stv *state)
{ … }
static int tracking_optimization(struct stv *state)
{ … }
static s32 table_lookup(const struct slookup *table,
int table_size, u32 reg_value)
{ … }
static int get_signal_to_noise(struct stv *state, s32 *signal_to_noise)
{ … }
static int get_bit_error_rate_s(struct stv *state, u32 *bernumerator,
u32 *berdenominator)
{ … }
static u32 dvbs2_nbch(enum dvbs2_mod_cod mod_cod, enum dvbs2_fectype fectype)
{ … }
static int get_bit_error_rate_s2(struct stv *state, u32 *bernumerator,
u32 *berdenominator)
{ … }
static int get_bit_error_rate(struct stv *state, u32 *bernumerator,
u32 *berdenominator)
{ … }
static int set_mclock(struct stv *state, u32 master_clock)
{ … }
static int stop(struct stv *state)
{ … }
static void set_pls(struct stv *state, u32 pls_code)
{ … }
static void set_isi(struct stv *state, u32 isi)
{ … }
static void set_stream_modes(struct stv *state,
struct dtv_frontend_properties *p)
{ … }
static int init_search_param(struct stv *state,
struct dtv_frontend_properties *p)
{ … }
static int enable_puncture_rate(struct stv *state, enum fe_code_rate rate)
{ … }
static int set_vth_default(struct stv *state)
{ … }
static int set_vth(struct stv *state)
{ … }
static int start(struct stv *state, struct dtv_frontend_properties *p)
{ … }
static int init_diseqc(struct stv *state)
{ … }
static int probe(struct stv *state)
{ … }
static int gate_ctrl(struct dvb_frontend *fe, int enable)
{ … }
static void release(struct dvb_frontend *fe)
{ … }
static int set_parameters(struct dvb_frontend *fe)
{ … }
static int manage_matype_info(struct stv *state)
{ … }
static int read_snr(struct dvb_frontend *fe)
{ … }
static int read_ber(struct dvb_frontend *fe)
{ … }
static void read_signal_strength(struct dvb_frontend *fe)
{ … }
static int read_status(struct dvb_frontend *fe, enum fe_status *status)
{ … }
static int get_frontend(struct dvb_frontend *fe,
struct dtv_frontend_properties *p)
{ … }
static int tune(struct dvb_frontend *fe, bool re_tune,
unsigned int mode_flags,
unsigned int *delay, enum fe_status *status)
{ … }
static enum dvbfe_algo get_algo(struct dvb_frontend *fe)
{ … }
static int set_tone(struct dvb_frontend *fe, enum fe_sec_tone_mode tone)
{ … }
static int wait_dis(struct stv *state, u8 flag, u8 val)
{ … }
static int send_master_cmd(struct dvb_frontend *fe,
struct dvb_diseqc_master_cmd *cmd)
{ … }
static int send_burst(struct dvb_frontend *fe, enum fe_sec_mini_cmd burst)
{ … }
static int sleep(struct dvb_frontend *fe)
{ … }
static const struct dvb_frontend_ops stv0910_ops = …;
static struct stv_base *match_base(struct i2c_adapter *i2c, u8 adr)
{ … }
static void stv0910_init_stats(struct stv *state)
{ … }
struct dvb_frontend *stv0910_attach(struct i2c_adapter *i2c,
struct stv0910_cfg *cfg,
int nr)
{ … }
EXPORT_SYMBOL_GPL(…);
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;