#include <linux/i2c.h>
#include <asm/div64.h>
#include <linux/firmware.h>
#include <linux/videodev2.h>
#include <linux/delay.h>
#include <media/tuner.h>
#include <linux/mutex.h>
#include <linux/slab.h>
#include <linux/unaligned.h>
#include "tuner-i2c.h"
#include "xc2028.h"
#include "xc2028-types.h"
#include <linux/dvb/frontend.h>
#include <media/dvb_frontend.h>
#define MAX_XFER_SIZE …
#define XREG_INIT …
#define XREG_RF_FREQ …
#define XREG_POWER_DOWN …
#define XREG_FREQ_ERROR …
#define XREG_LOCK …
#define XREG_VERSION …
#define XREG_PRODUCT_ID …
#define XREG_HSYNC_FREQ …
#define XREG_FRAME_LINES …
#define XREG_SNR …
#define XREG_ADC_ENV …
static int debug;
module_param(debug, int, 0644);
MODULE_PARM_DESC(…) …;
static int no_poweroff;
module_param(no_poweroff, int, 0644);
MODULE_PARM_DESC(…) …;
static char audio_std[8];
module_param_string(…);
MODULE_PARM_DESC(…) …;
static char firmware_name[30];
module_param_string(…);
MODULE_PARM_DESC(…) …;
static LIST_HEAD(hybrid_tuner_instance_list);
static DEFINE_MUTEX(xc2028_list_mutex);
struct firmware_description { … };
struct firmware_properties { … };
enum xc2028_state { … };
struct xc2028_data { … };
#define i2c_send(priv, buf, size) …
#define i2c_send_recv(priv, obuf, osize, ibuf, isize) …
#define send_seq(priv, data...) …
static int xc2028_get_reg(struct xc2028_data *priv, u16 reg, u16 *val)
{ … }
#define dump_firm_type(t) …
static void dump_firm_type_and_int_freq(unsigned int type, u16 int_freq)
{ … }
static v4l2_std_id parse_audio_std_option(void)
{ … }
static int check_device_status(struct xc2028_data *priv)
{ … }
static void free_firmware(struct xc2028_data *priv)
{ … }
static int load_all_firmwares(struct dvb_frontend *fe,
const struct firmware *fw)
{ … }
static int seek_firmware(struct dvb_frontend *fe, unsigned int type,
v4l2_std_id *id)
{ … }
static inline int do_tuner_callback(struct dvb_frontend *fe, int cmd, int arg)
{ … }
static int load_firmware(struct dvb_frontend *fe, unsigned int type,
v4l2_std_id *id)
{ … }
static int load_scode(struct dvb_frontend *fe, unsigned int type,
v4l2_std_id *id, __u16 int_freq, int scode)
{ … }
static int xc2028_sleep(struct dvb_frontend *fe);
static int check_firmware(struct dvb_frontend *fe, unsigned int type,
v4l2_std_id std, __u16 int_freq)
{ … }
static int xc2028_signal(struct dvb_frontend *fe, u16 *strength)
{ … }
static int xc2028_get_afc(struct dvb_frontend *fe, s32 *afc)
{ … }
#define DIV …
static int generic_set_freq(struct dvb_frontend *fe, u32 freq ,
enum v4l2_tuner_type new_type,
unsigned int type,
v4l2_std_id std,
u16 int_freq)
{ … }
static int xc2028_set_analog_freq(struct dvb_frontend *fe,
struct analog_parameters *p)
{ … }
static int xc2028_set_params(struct dvb_frontend *fe)
{ … }
static int xc2028_sleep(struct dvb_frontend *fe)
{ … }
static void xc2028_dvb_release(struct dvb_frontend *fe)
{ … }
static int xc2028_get_frequency(struct dvb_frontend *fe, u32 *frequency)
{ … }
static void load_firmware_cb(const struct firmware *fw,
void *context)
{ … }
static int xc2028_set_config(struct dvb_frontend *fe, void *priv_cfg)
{ … }
static const struct dvb_tuner_ops xc2028_dvb_tuner_ops = …;
struct dvb_frontend *xc2028_attach(struct dvb_frontend *fe,
struct xc2028_config *cfg)
{ … }
EXPORT_SYMBOL_GPL(…);
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_FIRMWARE(…);
MODULE_FIRMWARE(…);