#define pr_fmt(fmt) …
#include <linux/module.h>
#include <linux/init.h>
#include <linux/delay.h>
#include "bttvp.h"
#include <media/v4l2-common.h>
#include <linux/jiffies.h>
#include <asm/io.h>
static int i2c_debug;
static int i2c_hw;
static int i2c_scan;
module_param(i2c_debug, int, 0644);
MODULE_PARM_DESC(…) …;
module_param(i2c_hw, int, 0444);
MODULE_PARM_DESC(…) …;
module_param(i2c_scan, int, 0444);
MODULE_PARM_DESC(…) …;
static unsigned int i2c_udelay = …;
module_param(i2c_udelay, int, 0444);
MODULE_PARM_DESC(…) …;
static void bttv_bit_setscl(void *data, int state)
{ … }
static void bttv_bit_setsda(void *data, int state)
{ … }
static int bttv_bit_getscl(void *data)
{ … }
static int bttv_bit_getsda(void *data)
{ … }
static const struct i2c_algo_bit_data bttv_i2c_algo_bit_template = …;
static u32 functionality(struct i2c_adapter *adap)
{ … }
static int
bttv_i2c_wait_done(struct bttv *btv)
{ … }
#define I2C_HW …
static int
bttv_i2c_sendbytes(struct bttv *btv, const struct i2c_msg *msg, int last)
{ … }
static int
bttv_i2c_readbytes(struct bttv *btv, const struct i2c_msg *msg, int last)
{ … }
static int bttv_i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num)
{ … }
static const struct i2c_algorithm bttv_algo = …;
int bttv_I2CRead(struct bttv *btv, unsigned char addr, char *probe_for)
{ … }
int bttv_I2CWrite(struct bttv *btv, unsigned char addr, unsigned char b1,
unsigned char b2, int both)
{ … }
void bttv_readee(struct bttv *btv, unsigned char *eedata, int addr)
{ … }
static char *i2c_devs[128] = …;
static void do_i2c_scan(char *name, struct i2c_client *c)
{ … }
int init_bttv_i2c(struct bttv *btv)
{ … }
int fini_bttv_i2c(struct bttv *btv)
{ … }