#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/stddef.h>
#include <linux/ioport.h>
#include <linux/i2c.h>
#include <linux/io.h>
#define SMBHSTCNT …
#define SMBHSTSTS …
#define SMBHSTCLK …
#define SMBHSTADD …
#define SMBHSTCMD …
#define SMBHSTDAT0 …
#define SMBHSTDAT1 …
#define SMBBLKDAT …
#define MAX_RETRIES …
#define SCH_QUICK …
#define SCH_BYTE …
#define SCH_BYTE_DATA …
#define SCH_WORD_DATA …
#define SCH_BLOCK_DATA …
static unsigned short sch_smba;
static struct i2c_adapter sch_adapter;
static int backbone_speed = …;
module_param(backbone_speed, int, S_IRUSR | S_IWUSR);
MODULE_PARM_DESC(…) …;
static int sch_transaction(void)
{ … }
static s32 sch_access(struct i2c_adapter *adap, u16 addr,
unsigned short flags, char read_write,
u8 command, int size, union i2c_smbus_data *data)
{ … }
static u32 sch_func(struct i2c_adapter *adapter)
{ … }
static const struct i2c_algorithm smbus_algorithm = …;
static struct i2c_adapter sch_adapter = …;
static int smbus_sch_probe(struct platform_device *dev)
{ … }
static void smbus_sch_remove(struct platform_device *pdev)
{ … }
static struct platform_driver smbus_sch_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;