#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/dmi.h>
#include <linux/acpi.h>
#include <linux/slab.h>
#include <linux/io.h>
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
struct nforce2_smbus { … };
#define NFORCE_PCI_SMB1 …
#define NFORCE_PCI_SMB2 …
#define NVIDIA_SMB_PRTCL …
#define NVIDIA_SMB_STS …
#define NVIDIA_SMB_ADDR …
#define NVIDIA_SMB_CMD …
#define NVIDIA_SMB_DATA …
#define NVIDIA_SMB_BCNT …
#define NVIDIA_SMB_STATUS_ABRT …
#define NVIDIA_SMB_CTRL …
#define NVIDIA_SMB_STATUS_ABRT_STS …
#define NVIDIA_SMB_CTRL_ABORT …
#define NVIDIA_SMB_STS_DONE …
#define NVIDIA_SMB_STS_ALRM …
#define NVIDIA_SMB_STS_RES …
#define NVIDIA_SMB_STS_STATUS …
#define NVIDIA_SMB_PRTCL_WRITE …
#define NVIDIA_SMB_PRTCL_READ …
#define NVIDIA_SMB_PRTCL_QUICK …
#define NVIDIA_SMB_PRTCL_BYTE …
#define NVIDIA_SMB_PRTCL_BYTE_DATA …
#define NVIDIA_SMB_PRTCL_WORD_DATA …
#define NVIDIA_SMB_PRTCL_BLOCK_DATA …
#define NVIDIA_SMB_PRTCL_PEC …
#define MAX_TIMEOUT …
static const struct dmi_system_id nforce2_dmi_blacklist2[] = …;
static struct pci_driver nforce2_driver;
#if IS_ENABLED(CONFIG_I2C_NFORCE2_S4985)
struct i2c_adapter *nforce2_smbus;
EXPORT_SYMBOL_GPL(…);
static void nforce2_set_reference(struct i2c_adapter *adap)
{ … }
#else
static inline void nforce2_set_reference(struct i2c_adapter *adap) { }
#endif
static void nforce2_abort(struct i2c_adapter *adap)
{ … }
static int nforce2_check_status(struct i2c_adapter *adap)
{ … }
static s32 nforce2_access(struct i2c_adapter *adap, u16 addr,
unsigned short flags, char read_write,
u8 command, int size, union i2c_smbus_data *data)
{ … }
static u32 nforce2_func(struct i2c_adapter *adapter)
{ … }
static const struct i2c_algorithm smbus_algorithm = …;
static const struct pci_device_id nforce2_ids[] = …;
MODULE_DEVICE_TABLE(pci, nforce2_ids);
static int nforce2_probe_smb(struct pci_dev *dev, int bar, int alt_reg,
struct nforce2_smbus *smbus, const char *name)
{ … }
static int nforce2_probe(struct pci_dev *dev, const struct pci_device_id *id)
{ … }
static void nforce2_remove(struct pci_dev *dev)
{ … }
static struct pci_driver nforce2_driver = …;
module_pci_driver(…) …;