#include "mxl111sf-i2c.h"
#include "mxl111sf.h"
#define SW_I2C_ADDR …
#define SW_I2C_EN …
#define SW_SCL_OUT …
#define SW_SDA_OUT …
#define SW_SDA_IN …
#define SW_I2C_BUSY_ADDR …
#define SW_I2C_BUSY …
static int mxl111sf_i2c_bitbang_sendbyte(struct mxl111sf_state *state,
u8 byte)
{ … }
static int mxl111sf_i2c_bitbang_recvbyte(struct mxl111sf_state *state,
u8 *pbyte)
{ … }
static int mxl111sf_i2c_start(struct mxl111sf_state *state)
{ … }
static int mxl111sf_i2c_stop(struct mxl111sf_state *state)
{ … }
static int mxl111sf_i2c_ack(struct mxl111sf_state *state)
{ … }
static int mxl111sf_i2c_nack(struct mxl111sf_state *state)
{ … }
static int mxl111sf_i2c_sw_xfer_msg(struct mxl111sf_state *state,
struct i2c_msg *msg)
{ … }
#define USB_WRITE_I2C_CMD …
#define USB_READ_I2C_CMD …
#define USB_END_I2C_CMD …
#define USB_WRITE_I2C_CMD_LEN …
#define USB_READ_I2C_CMD_LEN …
#define I2C_MUX_REG …
#define I2C_CONTROL_REG …
#define I2C_SLAVE_ADDR_REG …
#define I2C_DATA_REG …
#define I2C_INT_STATUS_REG …
static int mxl111sf_i2c_send_data(struct mxl111sf_state *state,
u8 index, u8 *wdata)
{ … }
static int mxl111sf_i2c_get_data(struct mxl111sf_state *state,
u8 index, u8 *wdata, u8 *rdata)
{ … }
static u8 mxl111sf_i2c_check_status(struct mxl111sf_state *state)
{ … }
static u8 mxl111sf_i2c_check_fifo(struct mxl111sf_state *state)
{ … }
static int mxl111sf_i2c_readagain(struct mxl111sf_state *state,
u8 count, u8 *rbuf)
{ … }
#define HWI2C400 …
static int mxl111sf_i2c_hw_xfer_msg(struct mxl111sf_state *state,
struct i2c_msg *msg)
{ … }
int mxl111sf_i2c_xfer(struct i2c_adapter *adap,
struct i2c_msg msg[], int num)
{ … }