#include <asm/div64.h>
#include <linux/dvb/frontend.h>
#include <linux/slab.h>
#include <linux/int_log.h>
#include "lgdt3305.h"
static int debug;
module_param(debug, int, 0644);
MODULE_PARM_DESC(…) …;
#define DBG_INFO …
#define DBG_REG …
#define lg_printk(kern, fmt, arg...) …
#define lg_info(fmt, arg...) …
#define lg_warn(fmt, arg...) …
#define lg_err(fmt, arg...) …
#define lg_dbg(fmt, arg...) …
#define lg_reg(fmt, arg...) …
#define lg_fail(ret) …
struct lgdt3305_state { … };
#define LGDT3305_GEN_CTRL_1 …
#define LGDT3305_GEN_CTRL_2 …
#define LGDT3305_GEN_CTRL_3 …
#define LGDT3305_GEN_STATUS …
#define LGDT3305_GEN_CONTROL …
#define LGDT3305_GEN_CTRL_4 …
#define LGDT3305_DGTL_AGC_REF_1 …
#define LGDT3305_DGTL_AGC_REF_2 …
#define LGDT3305_CR_CTR_FREQ_1 …
#define LGDT3305_CR_CTR_FREQ_2 …
#define LGDT3305_CR_CTR_FREQ_3 …
#define LGDT3305_CR_CTR_FREQ_4 …
#define LGDT3305_CR_MSE_1 …
#define LGDT3305_CR_MSE_2 …
#define LGDT3305_CR_LOCK_STATUS …
#define LGDT3305_CR_CTRL_7 …
#define LGDT3305_AGC_POWER_REF_1 …
#define LGDT3305_AGC_POWER_REF_2 …
#define LGDT3305_AGC_DELAY_PT_1 …
#define LGDT3305_AGC_DELAY_PT_2 …
#define LGDT3305_RFAGC_LOOP_FLTR_BW_1 …
#define LGDT3305_RFAGC_LOOP_FLTR_BW_2 …
#define LGDT3305_IFBW_1 …
#define LGDT3305_IFBW_2 …
#define LGDT3305_AGC_CTRL_1 …
#define LGDT3305_AGC_CTRL_4 …
#define LGDT3305_EQ_MSE_1 …
#define LGDT3305_EQ_MSE_2 …
#define LGDT3305_EQ_MSE_3 …
#define LGDT3305_PT_MSE_1 …
#define LGDT3305_PT_MSE_2 …
#define LGDT3305_PT_MSE_3 …
#define LGDT3305_FEC_BLOCK_CTRL …
#define LGDT3305_FEC_LOCK_STATUS …
#define LGDT3305_FEC_PKT_ERR_1 …
#define LGDT3305_FEC_PKT_ERR_2 …
#define LGDT3305_TP_CTRL_1 …
#define LGDT3305_BERT_PERIOD …
#define LGDT3305_BERT_ERROR_COUNT_1 …
#define LGDT3305_BERT_ERROR_COUNT_2 …
#define LGDT3305_BERT_ERROR_COUNT_3 …
#define LGDT3305_BERT_ERROR_COUNT_4 …
static int lgdt3305_write_reg(struct lgdt3305_state *state, u16 reg, u8 val)
{ … }
static int lgdt3305_read_reg(struct lgdt3305_state *state, u16 reg, u8 *val)
{ … }
#define read_reg(state, reg) …
static int lgdt3305_set_reg_bit(struct lgdt3305_state *state,
u16 reg, int bit, int onoff)
{ … }
struct lgdt3305_reg { … };
static int lgdt3305_write_regs(struct lgdt3305_state *state,
struct lgdt3305_reg *regs, int len)
{ … }
static int lgdt3305_soft_reset(struct lgdt3305_state *state)
{ … }
static inline int lgdt3305_mpeg_mode(struct lgdt3305_state *state,
enum lgdt3305_mpeg_mode mode)
{ … }
static int lgdt3305_mpeg_mode_polarity(struct lgdt3305_state *state)
{ … }
static int lgdt3305_set_modulation(struct lgdt3305_state *state,
struct dtv_frontend_properties *p)
{ … }
static int lgdt3305_set_filter_extension(struct lgdt3305_state *state,
struct dtv_frontend_properties *p)
{ … }
static int lgdt3305_passband_digital_agc(struct lgdt3305_state *state,
struct dtv_frontend_properties *p)
{ … }
static int lgdt3305_rfagc_loop(struct lgdt3305_state *state,
struct dtv_frontend_properties *p)
{ … }
static int lgdt3305_agc_setup(struct lgdt3305_state *state,
struct dtv_frontend_properties *p)
{ … }
static int lgdt3305_set_agc_power_ref(struct lgdt3305_state *state,
struct dtv_frontend_properties *p)
{ … }
static int lgdt3305_spectral_inversion(struct lgdt3305_state *state,
struct dtv_frontend_properties *p,
int inversion)
{ … }
static int lgdt3305_set_if(struct lgdt3305_state *state,
struct dtv_frontend_properties *p)
{ … }
static int lgdt3305_i2c_gate_ctrl(struct dvb_frontend *fe, int enable)
{ … }
static int lgdt3305_sleep(struct dvb_frontend *fe)
{ … }
static int lgdt3305_init(struct dvb_frontend *fe)
{ … }
static int lgdt3304_set_parameters(struct dvb_frontend *fe)
{ … }
static int lgdt3305_set_parameters(struct dvb_frontend *fe)
{ … }
static int lgdt3305_get_frontend(struct dvb_frontend *fe,
struct dtv_frontend_properties *p)
{ … }
static int lgdt3305_read_cr_lock_status(struct lgdt3305_state *state,
int *locked)
{ … }
static int lgdt3305_read_fec_lock_status(struct lgdt3305_state *state,
int *locked)
{ … }
static int lgdt3305_read_status(struct dvb_frontend *fe, enum fe_status *status)
{ … }
static u32 calculate_snr(u32 mse, u32 c)
{ … }
static int lgdt3305_read_snr(struct dvb_frontend *fe, u16 *snr)
{ … }
static int lgdt3305_read_signal_strength(struct dvb_frontend *fe,
u16 *strength)
{ … }
static int lgdt3305_read_ber(struct dvb_frontend *fe, u32 *ber)
{ … }
static int lgdt3305_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks)
{ … }
static int lgdt3305_get_tune_settings(struct dvb_frontend *fe,
struct dvb_frontend_tune_settings
*fe_tune_settings)
{ … }
static void lgdt3305_release(struct dvb_frontend *fe)
{ … }
static const struct dvb_frontend_ops lgdt3304_ops;
static const struct dvb_frontend_ops lgdt3305_ops;
struct dvb_frontend *lgdt3305_attach(const struct lgdt3305_config *config,
struct i2c_adapter *i2c_adap)
{ … }
EXPORT_SYMBOL_GPL(…);
static const struct dvb_frontend_ops lgdt3304_ops = …;
static const struct dvb_frontend_ops lgdt3305_ops = …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_VERSION(…) …;