#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
#ifdef DEBUG
#define bit_dbg(level, dev, format, args...) …
#else
#define bit_dbg …
#endif
static int bit_test;
module_param(bit_test, int, S_IRUGO);
MODULE_PARM_DESC(…) …;
#ifdef DEBUG
static int i2c_debug = …;
module_param(i2c_debug, int, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(…) …;
#endif
#define setsda(adap, val) …
#define setscl(adap, val) …
#define getsda(adap) …
#define getscl(adap) …
static inline void sdalo(struct i2c_algo_bit_data *adap)
{ … }
static inline void sdahi(struct i2c_algo_bit_data *adap)
{ … }
static inline void scllo(struct i2c_algo_bit_data *adap)
{ … }
static int sclhi(struct i2c_algo_bit_data *adap)
{ … }
static void i2c_start(struct i2c_algo_bit_data *adap)
{ … }
static void i2c_repstart(struct i2c_algo_bit_data *adap)
{ … }
static void i2c_stop(struct i2c_algo_bit_data *adap)
{ … }
static int i2c_outb(struct i2c_adapter *i2c_adap, unsigned char c)
{ … }
static int i2c_inb(struct i2c_adapter *i2c_adap)
{ … }
static int test_bus(struct i2c_adapter *i2c_adap)
{ … }
static int try_address(struct i2c_adapter *i2c_adap,
unsigned char addr, int retries)
{ … }
static int sendbytes(struct i2c_adapter *i2c_adap, struct i2c_msg *msg)
{ … }
static int acknak(struct i2c_adapter *i2c_adap, int is_ack)
{ … }
static int readbytes(struct i2c_adapter *i2c_adap, struct i2c_msg *msg)
{ … }
static int bit_doAddress(struct i2c_adapter *i2c_adap, struct i2c_msg *msg)
{ … }
static int bit_xfer(struct i2c_adapter *i2c_adap,
struct i2c_msg msgs[], int num)
{ … }
static int bit_xfer_atomic(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[],
int num)
{ … }
static u32 bit_func(struct i2c_adapter *adap)
{ … }
const struct i2c_algorithm i2c_bit_algo = …;
EXPORT_SYMBOL(…);
static const struct i2c_adapter_quirks i2c_bit_quirk_no_clk_stretch = …;
static int __i2c_bit_add_bus(struct i2c_adapter *adap,
int (*add_adapter)(struct i2c_adapter *))
{ … }
int i2c_bit_add_bus(struct i2c_adapter *adap)
{ … }
EXPORT_SYMBOL(…);
int i2c_bit_add_numbered_bus(struct i2c_adapter *adap)
{ … }
EXPORT_SYMBOL(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;