#define pr_fmt(fmt) …
#include <linux/module.h>
#include <linux/i2c.h>
#include "cx25821.h"
static unsigned int i2c_debug;
module_param(i2c_debug, int, 0644);
MODULE_PARM_DESC(…) …;
static unsigned int i2c_scan;
module_param(i2c_scan, int, 0444);
MODULE_PARM_DESC(…) …;
#define dprintk(level, fmt, arg...) …
#define I2C_WAIT_DELAY …
#define I2C_WAIT_RETRY …
#define I2C_EXTEND …
#define I2C_NOSTOP …
static inline int i2c_slave_did_ack(struct i2c_adapter *i2c_adap)
{ … }
static inline int i2c_is_busy(struct i2c_adapter *i2c_adap)
{ … }
static int i2c_wait_done(struct i2c_adapter *i2c_adap)
{ … }
static int i2c_sendbytes(struct i2c_adapter *i2c_adap,
const struct i2c_msg *msg, int joined_rlen)
{ … }
static int i2c_readbytes(struct i2c_adapter *i2c_adap,
const struct i2c_msg *msg, int joined)
{ … }
static int i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num)
{ … }
static u32 cx25821_functionality(struct i2c_adapter *adap)
{ … }
static const struct i2c_algorithm cx25821_i2c_algo_template = …;
static const struct i2c_adapter cx25821_i2c_adap_template = …;
static const struct i2c_client cx25821_i2c_client_template = …;
int cx25821_i2c_register(struct cx25821_i2c *bus)
{ … }
int cx25821_i2c_unregister(struct cx25821_i2c *bus)
{ … }
#if 0
static void cx25821_av_clk(struct cx25821_dev *dev, int enable)
{
char buffer[3];
struct i2c_msg msg;
dprintk(1, "%s(enabled = %d)\n", __func__, enable);
buffer[0] = 0x01;
buffer[1] = 0x44;
if (enable == 1)
buffer[2] = 0x05;
else
buffer[2] = 0x00;
msg.addr = 0x44;
msg.flags = I2C_M_TEN;
msg.len = 3;
msg.buf = buffer;
i2c_xfer(&dev->i2c_bus[0].i2c_adap, &msg, 1);
}
#endif
int cx25821_i2c_read(struct cx25821_i2c *bus, u16 reg_addr, int *value)
{ … }
int cx25821_i2c_write(struct cx25821_i2c *bus, u16 reg_addr, int value)
{ … }