#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/ioport.h>
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
#include <linux/io.h>
#define PM_CFG_REVID …
#define PM_CFG_IOBASE0 …
#define PM_CFG_IOBASE1 …
#define I2C_DIR …
#define I2C_OUT …
#define I2C_IN …
#define I2C_SCL …
#define I2C_SDA …
#define IOSPACE …
static struct pci_driver vt586b_driver;
static u16 pm_io_base;
static void bit_via_setscl(void *data, int state)
{ … }
static void bit_via_setsda(void *data, int state)
{ … }
static int bit_via_getscl(void *data)
{ … }
static int bit_via_getsda(void *data)
{ … }
static struct i2c_algo_bit_data bit_data = …;
static struct i2c_adapter vt586b_adapter = …;
static const struct pci_device_id vt586b_ids[] = …;
MODULE_DEVICE_TABLE (pci, vt586b_ids);
static int vt586b_probe(struct pci_dev *dev, const struct pci_device_id *id)
{ … }
static void vt586b_remove(struct pci_dev *dev)
{ … }
static struct pci_driver vt586b_driver = …;
module_pci_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;