#include <linux/module.h>
#include <linux/delay.h>
#include <linux/sched.h>
#include <linux/list.h>
#include <linux/unistd.h>
#include <linux/time.h>
#include <linux/device.h>
#include <linux/i2c.h>
#include <linux/mutex.h>
#include <linux/uaccess.h>
#include "go7007-priv.h"
#define SPI_I2C_ADDR_BASE …
#define STATUS_REG_ADDR …
#define I2C_CTRL_REG_ADDR …
#define I2C_DEV_UP_ADDR_REG_ADDR …
#define I2C_LO_ADDR_REG_ADDR …
#define I2C_DATA_REG_ADDR …
#define I2C_CLKFREQ_REG_ADDR …
#define I2C_STATE_MASK …
#define I2C_READ_READY_MASK …
static DEFINE_MUTEX(adlink_mpg24_i2c_mutex);
static inline void adlink_mpg24_i2c_lock(struct go7007 *go)
{ … }
static inline void adlink_mpg24_i2c_unlock(struct go7007 *go)
{ … }
static int go7007_i2c_xfer(struct go7007 *go, u16 addr, int read,
u16 command, int flags, u8 *data)
{ … }
static int go7007_smbus_xfer(struct i2c_adapter *adapter, u16 addr,
unsigned short flags, char read_write,
u8 command, int size, union i2c_smbus_data *data)
{ … }
static int go7007_i2c_master_xfer(struct i2c_adapter *adapter,
struct i2c_msg msgs[], int num)
{ … }
static u32 go7007_functionality(struct i2c_adapter *adapter)
{ … }
static const struct i2c_algorithm go7007_algo = …;
static struct i2c_adapter go7007_adap_templ = …;
int go7007_i2c_init(struct go7007 *go)
{ … }