#define pr_fmt(fmt) …
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/i2c.h>
#include <linux/mutex.h>
#include <asm/div64.h>
#include <linux/int_log.h>
#include <media/dvb_frontend.h>
#include "dib7000p.h"
static int debug;
module_param(debug, int, 0644);
MODULE_PARM_DESC(…) …;
static int buggy_sfn_workaround;
module_param(buggy_sfn_workaround, int, 0644);
MODULE_PARM_DESC(…) …;
#define dprintk(fmt, arg...) …
struct dib7000p_state { … };
enum dib7000p_power_mode { … };
static int dib7090_set_output_mode(struct dvb_frontend *fe, int mode);
static int dib7090_set_diversity_in(struct dvb_frontend *fe, int onoff);
static void dib7090_setDibTxMux(struct dib7000p_state *state, int mode);
static void dib7090_setHostBusMux(struct dib7000p_state *state, int mode);
static u16 dib7000p_read_word(struct dib7000p_state *state, u16 reg)
{ … }
static int dib7000p_write_word(struct dib7000p_state *state, u16 reg, u16 val)
{ … }
static void dib7000p_write_tab(struct dib7000p_state *state, u16 * buf)
{ … }
static int dib7000p_set_output_mode(struct dib7000p_state *state, int mode)
{ … }
static int dib7000p_set_diversity_in(struct dvb_frontend *demod, int onoff)
{ … }
static int dib7000p_set_power_mode(struct dib7000p_state *state, enum dib7000p_power_mode mode)
{ … }
static void dib7000p_set_adc_state(struct dib7000p_state *state, enum dibx000_adc_states no)
{ … }
static int dib7000p_set_bandwidth(struct dib7000p_state *state, u32 bw)
{ … }
static int dib7000p_sad_calib(struct dib7000p_state *state)
{ … }
static int dib7000p_set_wbd_ref(struct dvb_frontend *demod, u16 value)
{ … }
static int dib7000p_get_agc_values(struct dvb_frontend *fe,
u16 *agc_global, u16 *agc1, u16 *agc2, u16 *wbd)
{ … }
static int dib7000p_set_agc1_min(struct dvb_frontend *fe, u16 v)
{ … }
static void dib7000p_reset_pll(struct dib7000p_state *state)
{ … }
static u32 dib7000p_get_internal_freq(struct dib7000p_state *state)
{ … }
static int dib7000p_update_pll(struct dvb_frontend *fe, struct dibx000_bandwidth_config *bw)
{ … }
static int dib7000p_reset_gpio(struct dib7000p_state *st)
{ … }
static int dib7000p_cfg_gpio(struct dib7000p_state *st, u8 num, u8 dir, u8 val)
{ … }
static int dib7000p_set_gpio(struct dvb_frontend *demod, u8 num, u8 dir, u8 val)
{ … }
static u16 dib7000p_defaults[] = …;
static void dib7000p_reset_stats(struct dvb_frontend *fe);
static int dib7000p_demod_reset(struct dib7000p_state *state)
{ … }
static void dib7000p_pll_clk_cfg(struct dib7000p_state *state)
{ … }
static void dib7000p_restart_agc(struct dib7000p_state *state)
{ … }
static int dib7000p_update_lna(struct dib7000p_state *state)
{ … }
static int dib7000p_set_agc_config(struct dib7000p_state *state, u8 band)
{ … }
static int dib7000p_set_dds(struct dib7000p_state *state, s32 offset_khz)
{ … }
static int dib7000p_agc_startup(struct dvb_frontend *demod)
{ … }
static void dib7000p_update_timf(struct dib7000p_state *state)
{ … }
static u32 dib7000p_ctrl_timf(struct dvb_frontend *fe, u8 op, u32 timf)
{ … }
static void dib7000p_set_channel(struct dib7000p_state *state,
struct dtv_frontend_properties *ch, u8 seq)
{ … }
static int dib7000p_autosearch_start(struct dvb_frontend *demod)
{ … }
static int dib7000p_autosearch_is_irq(struct dvb_frontend *demod)
{ … }
static void dib7000p_spur_protect(struct dib7000p_state *state, u32 rf_khz, u32 bw)
{ … }
static int dib7000p_tune(struct dvb_frontend *demod)
{ … }
static int dib7000p_wakeup(struct dvb_frontend *demod)
{ … }
static int dib7000p_sleep(struct dvb_frontend *demod)
{ … }
static int dib7000p_identify(struct dib7000p_state *st)
{ … }
static int dib7000p_get_frontend(struct dvb_frontend *fe,
struct dtv_frontend_properties *fep)
{ … }
static int dib7000p_set_frontend(struct dvb_frontend *fe)
{ … }
static int dib7000p_get_stats(struct dvb_frontend *fe, enum fe_status stat);
static int dib7000p_read_status(struct dvb_frontend *fe, enum fe_status *stat)
{ … }
static int dib7000p_read_ber(struct dvb_frontend *fe, u32 * ber)
{ … }
static int dib7000p_read_unc_blocks(struct dvb_frontend *fe, u32 * unc)
{ … }
static int dib7000p_read_signal_strength(struct dvb_frontend *fe, u16 * strength)
{ … }
static u32 dib7000p_get_snr(struct dvb_frontend *fe)
{ … }
static int dib7000p_read_snr(struct dvb_frontend *fe, u16 *snr)
{ … }
static void dib7000p_reset_stats(struct dvb_frontend *demod)
{ … }
struct linear_segments { … };
#define DB_OFFSET …
static struct linear_segments strength_to_db_table[] = …;
static u32 interpolate_value(u32 value, struct linear_segments *segments,
unsigned len)
{ … }
static u32 dib7000p_get_time_us(struct dvb_frontend *demod)
{ … }
static int dib7000p_get_stats(struct dvb_frontend *demod, enum fe_status stat)
{ … }
static int dib7000p_fe_get_tune_settings(struct dvb_frontend *fe, struct dvb_frontend_tune_settings *tune)
{ … }
static void dib7000p_release(struct dvb_frontend *demod)
{ … }
static int dib7000pc_detection(struct i2c_adapter *i2c_adap)
{ … }
static struct i2c_adapter *dib7000p_get_i2c_master(struct dvb_frontend *demod, enum dibx000_i2c_interface intf, int gating)
{ … }
static int dib7000p_pid_filter_ctrl(struct dvb_frontend *fe, u8 onoff)
{ … }
static int dib7000p_pid_filter(struct dvb_frontend *fe, u8 id, u16 pid, u8 onoff)
{ … }
static int dib7000p_i2c_enumeration(struct i2c_adapter *i2c, int no_of_demods, u8 default_addr, struct dib7000p_config cfg[])
{ … }
static const s32 lut_1000ln_mant[] = …;
static s32 dib7000p_get_adc_power(struct dvb_frontend *fe)
{ … }
static int map_addr_to_serpar_number(struct i2c_msg *msg)
{ … }
static int w7090p_tuner_write_serpar(struct i2c_adapter *i2c_adap, struct i2c_msg msg[], int num)
{ … }
static int w7090p_tuner_read_serpar(struct i2c_adapter *i2c_adap, struct i2c_msg msg[], int num)
{ … }
static int w7090p_tuner_rw_serpar(struct i2c_adapter *i2c_adap, struct i2c_msg msg[], int num)
{ … }
static int dib7090p_rw_on_apb(struct i2c_adapter *i2c_adap,
struct i2c_msg msg[], int num, u16 apb_address)
{ … }
static int dib7090_tuner_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msg[], int num)
{ … }
static u32 dib7000p_i2c_func(struct i2c_adapter *adapter)
{ … }
static const struct i2c_algorithm dib7090_tuner_xfer_algo = …;
static struct i2c_adapter *dib7090_get_i2c_tuner(struct dvb_frontend *fe)
{ … }
static int dib7090_host_bus_drive(struct dib7000p_state *state, u8 drive)
{ … }
static u32 dib7090_calcSyncFreq(u32 P_Kin, u32 P_Kout, u32 insertExtSynchro, u32 syncSize)
{ … }
static int dib7090_cfg_DibTx(struct dib7000p_state *state, u32 P_Kin, u32 P_Kout, u32 insertExtSynchro, u32 synchroMode, u32 syncWord, u32 syncSize)
{ … }
static int dib7090_cfg_DibRx(struct dib7000p_state *state, u32 P_Kin, u32 P_Kout, u32 synchroMode, u32 insertExtSynchro, u32 syncWord, u32 syncSize,
u32 dataOutRate)
{ … }
static void dib7090_enMpegMux(struct dib7000p_state *state, int onoff)
{ … }
static void dib7090_configMpegMux(struct dib7000p_state *state,
u16 pulseWidth, u16 enSerialMode, u16 enSerialClkDiv2)
{ … }
static void dib7090_setDibTxMux(struct dib7000p_state *state, int mode)
{ … }
static void dib7090_setHostBusMux(struct dib7000p_state *state, int mode)
{ … }
static int dib7090_set_diversity_in(struct dvb_frontend *fe, int onoff)
{ … }
static int dib7090_set_output_mode(struct dvb_frontend *fe, int mode)
{ … }
static int dib7090_tuner_sleep(struct dvb_frontend *fe, int onoff)
{ … }
static int dib7090_get_adc_power(struct dvb_frontend *fe)
{ … }
static int dib7090_slave_reset(struct dvb_frontend *fe)
{ … }
static const struct dvb_frontend_ops dib7000p_ops;
static struct dvb_frontend *dib7000p_init(struct i2c_adapter *i2c_adap, u8 i2c_addr, struct dib7000p_config *cfg)
{ … }
void *dib7000p_attach(struct dib7000p_ops *ops)
{ … }
EXPORT_SYMBOL_GPL(…);
static const struct dvb_frontend_ops dib7000p_ops = …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;