#include <linux/delay.h>
#include <linux/device.h>
#include <linux/i2c.h>
#include <linux/io.h>
#include <linux/pci.h>
#include "pt3.h"
#define PT3_I2C_BASE …
#define PT3_CMD_ADDR_NORMAL …
#define PT3_CMD_ADDR_INIT_DEMOD …
#define PT3_CMD_ADDR_INIT_TUNER …
#define STAT_SEQ_RUNNING …
#define STAT_SEQ_ERROR …
#define STAT_NO_SEQ …
#define PT3_I2C_RUN …
#define PT3_I2C_RESET …
enum ctl_cmd { … };
static void cmdbuf_add(struct pt3_i2cbuf *cbuf, enum ctl_cmd cmd)
{ … }
static void put_end(struct pt3_i2cbuf *cbuf)
{ … }
static void put_start(struct pt3_i2cbuf *cbuf)
{ … }
static void put_byte_write(struct pt3_i2cbuf *cbuf, u8 val)
{ … }
static void put_byte_read(struct pt3_i2cbuf *cbuf, u32 size)
{ … }
static void put_stop(struct pt3_i2cbuf *cbuf)
{ … }
static void translate(struct pt3_i2cbuf *cbuf, struct i2c_msg *msgs, int num)
{ … }
static int wait_i2c_result(struct pt3_board *pt3, u32 *result, int max_wait)
{ … }
static int send_i2c_cmd(struct pt3_board *pt3, u32 addr)
{ … }
int pt3_init_all_demods(struct pt3_board *pt3)
{ … }
int pt3_init_all_mxl301rf(struct pt3_board *pt3)
{ … }
void pt3_i2c_reset(struct pt3_board *pt3)
{ … }
int
pt3_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
{ … }
u32 pt3_i2c_functionality(struct i2c_adapter *adap)
{ … }