#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/string.h>
#include <linux/slab.h>
#include <linux/firmware.h>
#include <linux/regmap.h>
#include <media/dvb_frontend.h>
#include <linux/int_log.h>
#include "si2165_priv.h"
#include "si2165.h"
struct si2165_state { … };
static int si2165_write(struct si2165_state *state, const u16 reg,
const u8 *src, const int count)
{ … }
static int si2165_read(struct si2165_state *state,
const u16 reg, u8 *val, const int count)
{ … }
static int si2165_readreg8(struct si2165_state *state,
const u16 reg, u8 *val)
{ … }
static int si2165_readreg16(struct si2165_state *state,
const u16 reg, u16 *val)
{ … }
static int si2165_readreg24(struct si2165_state *state,
const u16 reg, u32 *val)
{ … }
static int si2165_writereg8(struct si2165_state *state, const u16 reg, u8 val)
{ … }
static int si2165_writereg16(struct si2165_state *state, const u16 reg, u16 val)
{ … }
static int si2165_writereg24(struct si2165_state *state, const u16 reg, u32 val)
{ … }
static int si2165_writereg32(struct si2165_state *state, const u16 reg, u32 val)
{ … }
static int si2165_writereg_mask8(struct si2165_state *state, const u16 reg,
u8 val, u8 mask)
{ … }
#define REG16(reg, val) …
struct si2165_reg_value_pair { … };
static int si2165_write_reg_list(struct si2165_state *state,
const struct si2165_reg_value_pair *regs,
int count)
{ … }
static int si2165_get_tune_settings(struct dvb_frontend *fe,
struct dvb_frontend_tune_settings *s)
{ … }
static int si2165_init_pll(struct si2165_state *state)
{ … }
static int si2165_adjust_pll_divl(struct si2165_state *state, u8 divl)
{ … }
static u32 si2165_get_fe_clk(struct si2165_state *state)
{ … }
static int si2165_wait_init_done(struct si2165_state *state)
{ … }
static int si2165_upload_firmware_block(struct si2165_state *state,
const u8 *data, u32 len, u32 *poffset,
u32 block_count)
{ … }
static int si2165_upload_firmware(struct si2165_state *state)
{ … }
static int si2165_init(struct dvb_frontend *fe)
{ … }
static int si2165_sleep(struct dvb_frontend *fe)
{ … }
static int si2165_read_status(struct dvb_frontend *fe, enum fe_status *status)
{ … }
static int si2165_read_snr(struct dvb_frontend *fe, u16 *snr)
{ … }
static int si2165_read_ber(struct dvb_frontend *fe, u32 *ber)
{ … }
static int si2165_set_oversamp(struct si2165_state *state, u32 dvb_rate)
{ … }
static int si2165_set_if_freq_shift(struct si2165_state *state)
{ … }
static const struct si2165_reg_value_pair dvbt_regs[] = …;
static int si2165_set_frontend_dvbt(struct dvb_frontend *fe)
{ … }
static const struct si2165_reg_value_pair dvbc_regs[] = …;
static int si2165_set_frontend_dvbc(struct dvb_frontend *fe)
{ … }
static const struct si2165_reg_value_pair adc_rewrite[] = …;
static int si2165_set_frontend(struct dvb_frontend *fe)
{ … }
static const struct dvb_frontend_ops si2165_ops = …;
static int si2165_probe(struct i2c_client *client)
{ … }
static void si2165_remove(struct i2c_client *client)
{ … }
static const struct i2c_device_id si2165_id_table[] = …;
MODULE_DEVICE_TABLE(i2c, si2165_id_table);
static struct i2c_driver si2165_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_FIRMWARE(…);