#include "em28xx.h"
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/usb.h>
#include <linux/i2c.h>
#include <linux/jiffies.h>
#include "xc2028.h"
#include <media/v4l2-common.h>
#include <media/tuner.h>
static unsigned int i2c_scan;
module_param(i2c_scan, int, 0444);
MODULE_PARM_DESC(…) …;
static unsigned int i2c_debug;
module_param(i2c_debug, int, 0644);
MODULE_PARM_DESC(…) …;
#define dprintk(level, fmt, arg...) …
#define EM28XX_I2C_XFER_TIMEOUT …
static int em28xx_i2c_timeout(struct em28xx *dev)
{ … }
static int em2800_i2c_send_bytes(struct em28xx *dev, u8 addr, u8 *buf, u16 len)
{ … }
static int em2800_i2c_recv_bytes(struct em28xx *dev, u8 addr, u8 *buf, u16 len)
{ … }
static int em2800_i2c_check_for_device(struct em28xx *dev, u8 addr)
{ … }
static int em28xx_i2c_send_bytes(struct em28xx *dev, u16 addr, u8 *buf,
u16 len, int stop)
{ … }
static int em28xx_i2c_recv_bytes(struct em28xx *dev, u16 addr, u8 *buf, u16 len)
{ … }
static int em28xx_i2c_check_for_device(struct em28xx *dev, u16 addr)
{ … }
static int em25xx_bus_B_send_bytes(struct em28xx *dev, u16 addr, u8 *buf,
u16 len)
{ … }
static int em25xx_bus_B_recv_bytes(struct em28xx *dev, u16 addr, u8 *buf,
u16 len)
{ … }
static int em25xx_bus_B_check_for_device(struct em28xx *dev, u16 addr)
{ … }
static inline int i2c_check_for_device(struct em28xx_i2c_bus *i2c_bus, u16 addr)
{ … }
static inline int i2c_recv_bytes(struct em28xx_i2c_bus *i2c_bus,
struct i2c_msg msg)
{ … }
static inline int i2c_send_bytes(struct em28xx_i2c_bus *i2c_bus,
struct i2c_msg msg, int stop)
{ … }
static int em28xx_i2c_xfer(struct i2c_adapter *i2c_adap,
struct i2c_msg msgs[], int num)
{ … }
static inline unsigned long em28xx_hash_mem(char *buf, int length, int bits)
{ … }
static int em28xx_i2c_read_block(struct em28xx *dev, unsigned int bus, u16 addr,
bool addr_w16, u16 len, u8 *data)
{ … }
static int em28xx_i2c_eeprom(struct em28xx *dev, unsigned int bus,
u8 **eedata, u16 *eedata_len)
{ … }
static u32 functionality(struct i2c_adapter *i2c_adap)
{ … }
static const struct i2c_algorithm em28xx_algo = …;
static const struct i2c_adapter em28xx_adap_template = …;
static const struct i2c_client em28xx_client_template = …;
static char *i2c_devs[128] = …;
void em28xx_do_i2c_scan(struct em28xx *dev, unsigned int bus)
{ … }
int em28xx_i2c_register(struct em28xx *dev, unsigned int bus,
enum em28xx_i2c_algo_type algo_type)
{ … }
int em28xx_i2c_unregister(struct em28xx *dev, unsigned int bus)
{ … }