#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/mutex.h>
#include <linux/platform_device.h>
#include <linux/usb.h>
#include <linux/i2c.h>
#include <linux/mfd/viperboard.h>
struct vprbrd_i2c { … };
static u8 i2c_bus_param;
static unsigned int i2c_bus_freq = …;
module_param(i2c_bus_freq, int, 0);
MODULE_PARM_DESC(…) …;
static int vprbrd_i2c_status(struct i2c_adapter *i2c,
struct vprbrd_i2c_status *status, bool prev_error)
{ … }
static int vprbrd_i2c_receive(struct usb_device *usb_dev,
struct vprbrd_i2c_read_msg *rmsg, int bytes_xfer)
{ … }
static int vprbrd_i2c_addr(struct usb_device *usb_dev,
struct vprbrd_i2c_addr_msg *amsg)
{ … }
static int vprbrd_i2c_read(struct vprbrd *vb, struct i2c_msg *msg)
{ … }
static int vprbrd_i2c_write(struct vprbrd *vb, struct i2c_msg *msg)
{ … }
static int vprbrd_i2c_xfer(struct i2c_adapter *i2c, struct i2c_msg *msgs,
int num)
{ … }
static u32 vprbrd_i2c_func(struct i2c_adapter *i2c)
{ … }
static const struct i2c_algorithm vprbrd_algorithm = …;
static const struct i2c_adapter_quirks vprbrd_quirks = …;
static int vprbrd_i2c_probe(struct platform_device *pdev)
{ … }
static void vprbrd_i2c_remove(struct platform_device *pdev)
{ … }
static struct platform_driver vprbrd_i2c_driver = …;
static int __init vprbrd_i2c_init(void)
{ … }
subsys_initcall(vprbrd_i2c_init);
static void __exit vprbrd_i2c_exit(void)
{ … }
module_exit(vprbrd_i2c_exit);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;