#if IS_ENABLED(CONFIG_I2C)
#include <linux/i2c.h>
#include <linux/slab.h>
#include <linux/export.h>
#include "hdpvr.h"
#define CTRL_READ_REQUEST …
#define CTRL_WRITE_REQUEST …
#define REQTYPE_I2C_READ …
#define REQTYPE_I2C_WRITE …
#define REQTYPE_I2C_WRITE_STATT …
#define Z8F0811_IR_TX_I2C_ADDR …
#define Z8F0811_IR_RX_I2C_ADDR …
struct i2c_client *hdpvr_register_ir_i2c(struct hdpvr_device *dev)
{ … }
static int hdpvr_i2c_read(struct hdpvr_device *dev, int bus,
unsigned char addr, char *wdata, int wlen,
char *data, int len)
{ … }
static int hdpvr_i2c_write(struct hdpvr_device *dev, int bus,
unsigned char addr, char *data, int len)
{ … }
static int hdpvr_transfer(struct i2c_adapter *i2c_adapter, struct i2c_msg *msgs,
int num)
{ … }
static u32 hdpvr_functionality(struct i2c_adapter *adapter)
{ … }
static const struct i2c_algorithm hdpvr_algo = …;
static const struct i2c_adapter hdpvr_i2c_adapter_template = …;
static int hdpvr_activate_ir(struct hdpvr_device *dev)
{ … }
int hdpvr_register_i2c_adapter(struct hdpvr_device *dev)
{ … }
#endif