#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/delay.h>
#include "netup_unidvb.h"
#define NETUP_I2C_BUS0_ADDR …
#define NETUP_I2C_BUS1_ADDR …
#define NETUP_I2C_TIMEOUT …
#define TWI_IRQEN_COMPL …
#define TWI_IRQEN_ANACK …
#define TWI_IRQEN_DNACK …
#define TWI_IRQ_COMPL …
#define TWI_IRQ_ANACK …
#define TWI_IRQ_DNACK …
#define TWI_IRQ_TX …
#define TWI_IRQ_RX …
#define TWI_IRQEN …
#define TWI_TRANSFER …
#define TWI_NOSTOP …
#define TWI_SOFT_RESET …
#define TWI_CLKDIV …
#define FIFO_IRQEN …
#define FIFO_RESET …
#define FIFO_SIZE …
struct netup_i2c_fifo_regs { … } __packed __aligned(…);
struct netup_i2c_regs { … } __packed __aligned(…);
irqreturn_t netup_i2c_interrupt(struct netup_i2c *i2c)
{ … }
static void netup_i2c_reset(struct netup_i2c *i2c)
{ … }
static void netup_i2c_fifo_tx(struct netup_i2c *i2c)
{ … }
static void netup_i2c_fifo_rx(struct netup_i2c *i2c)
{ … }
static void netup_i2c_start_xfer(struct netup_i2c *i2c)
{ … }
static int netup_i2c_xfer(struct i2c_adapter *adap,
struct i2c_msg *msgs, int num)
{ … }
static u32 netup_i2c_func(struct i2c_adapter *adap)
{ … }
static const struct i2c_algorithm netup_i2c_algorithm = …;
static const struct i2c_adapter netup_i2c_adapter = …;
static int netup_i2c_init(struct netup_unidvb_dev *ndev, int bus_num)
{ … }
static void netup_i2c_remove(struct netup_unidvb_dev *ndev, int bus_num)
{ … }
int netup_i2c_register(struct netup_unidvb_dev *ndev)
{ … }
void netup_i2c_unregister(struct netup_unidvb_dev *ndev)
{ … }