#include <linux/module.h>
#include <linux/pci.h>
#include <linux/kernel.h>
#include <linux/stddef.h>
#include <linux/ioport.h>
#include <linux/i2c.h>
#include <linux/delay.h>
#include <linux/acpi.h>
#include <linux/slab.h>
#include <linux/io.h>
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
struct amd_smbus { … };
static struct pci_driver amd8111_driver;
#define AMD_PCI_MISC …
#define AMD_PCI_MISC_SCI …
#define AMD_PCI_MISC_INT …
#define AMD_PCI_MISC_SPEEDUP …
#define AMD_EC_DATA …
#define AMD_EC_SC …
#define AMD_EC_CMD …
#define AMD_EC_ICR …
#define AMD_EC_SC_SMI …
#define AMD_EC_SC_SCI …
#define AMD_EC_SC_BURST …
#define AMD_EC_SC_CMD …
#define AMD_EC_SC_IBF …
#define AMD_EC_SC_OBF …
#define AMD_EC_CMD_RD …
#define AMD_EC_CMD_WR …
#define AMD_EC_CMD_BE …
#define AMD_EC_CMD_BD …
#define AMD_EC_CMD_QR …
static int amd_ec_wait_write(struct amd_smbus *smbus)
{ … }
static int amd_ec_wait_read(struct amd_smbus *smbus)
{ … }
static int amd_ec_read(struct amd_smbus *smbus, unsigned char address,
unsigned char *data)
{ … }
static int amd_ec_write(struct amd_smbus *smbus, unsigned char address,
unsigned char data)
{ … }
#define AMD_SMB_PRTCL …
#define AMD_SMB_STS …
#define AMD_SMB_ADDR …
#define AMD_SMB_CMD …
#define AMD_SMB_DATA …
#define AMD_SMB_BCNT …
#define AMD_SMB_ALRM_A …
#define AMD_SMB_ALRM_D …
#define AMD_SMB_STS_DONE …
#define AMD_SMB_STS_ALRM …
#define AMD_SMB_STS_RES …
#define AMD_SMB_STS_STATUS …
#define AMD_SMB_STATUS_OK …
#define AMD_SMB_STATUS_FAIL …
#define AMD_SMB_STATUS_DNAK …
#define AMD_SMB_STATUS_DERR …
#define AMD_SMB_STATUS_CMD_DENY …
#define AMD_SMB_STATUS_UNKNOWN …
#define AMD_SMB_STATUS_ACC_DENY …
#define AMD_SMB_STATUS_TIMEOUT …
#define AMD_SMB_STATUS_NOTSUP …
#define AMD_SMB_STATUS_BUSY …
#define AMD_SMB_STATUS_PEC …
#define AMD_SMB_PRTCL_WRITE …
#define AMD_SMB_PRTCL_READ …
#define AMD_SMB_PRTCL_QUICK …
#define AMD_SMB_PRTCL_BYTE …
#define AMD_SMB_PRTCL_BYTE_DATA …
#define AMD_SMB_PRTCL_WORD_DATA …
#define AMD_SMB_PRTCL_BLOCK_DATA …
#define AMD_SMB_PRTCL_PROC_CALL …
#define AMD_SMB_PRTCL_BLOCK_PROC_CALL …
#define AMD_SMB_PRTCL_I2C_BLOCK_DATA …
#define AMD_SMB_PRTCL_PEC …
static s32 amd8111_access(struct i2c_adapter *adap, u16 addr,
unsigned short flags, char read_write, u8 command, int size,
union i2c_smbus_data *data)
{ … }
static u32 amd8111_func(struct i2c_adapter *adapter)
{ … }
static const struct i2c_algorithm smbus_algorithm = …;
static const struct pci_device_id amd8111_ids[] = …;
MODULE_DEVICE_TABLE (pci, amd8111_ids);
static int amd8111_probe(struct pci_dev *dev, const struct pci_device_id *id)
{ … }
static void amd8111_remove(struct pci_dev *dev)
{ … }
static struct pci_driver amd8111_driver = …;
module_pci_driver(…) …;