#include <linux/device.h>
#include <linux/i2c.h>
#include <linux/misc/keba.h>
#include <linux/module.h>
#include <linux/pci.h>
#define CP500 …
#define PCI_VENDOR_ID_KEBA …
#define PCI_DEVICE_ID_KEBA_CP035 …
#define PCI_DEVICE_ID_KEBA_CP505 …
#define PCI_DEVICE_ID_KEBA_CP520 …
#define CP500_SYS_BAR …
#define CP500_ECM_BAR …
#define CP500_VERSION_REG …
#define CP500_RECONFIG_REG …
#define CP500_AXI_REG …
#define CP500_BUILD_TEST …
#define CP500_RECFG_REQ …
#define CP500_AXI_MSIX …
#define CP500_NUM_MSIX …
#define CP500_NUM_MSIX_NO_MMI …
#define CP500_NUM_MSIX_NO_AXI …
#define CP500_HW_CPU_EEPROM_NAME …
#define CP500_IS_CP035(dev) …
#define CP500_IS_CP505(dev) …
#define CP500_IS_CP520(dev) …
struct cp500_dev_info { … };
struct cp500_devs { … };
static struct cp500_devs cp035_devices = …;
static struct cp500_devs cp505_devices = …;
static struct cp500_devs cp520_devices = …;
struct cp500 { … };
static struct i2c_board_info cp500_i2c_info[] = …;
static ssize_t cp500_get_fpga_version(struct cp500 *cp500, char *buf,
size_t max_len)
{ … }
static ssize_t version_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR_RO(version);
static ssize_t keep_cfg_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static ssize_t keep_cfg_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR_RW(keep_cfg);
static struct attribute *cp500_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static void cp500_i2c_release(struct device *dev)
{ … }
static int cp500_register_i2c(struct cp500 *cp500)
{ … }
static void cp500_register_auxiliary_devs(struct cp500 *cp500)
{ … }
static void cp500_unregister_dev(struct auxiliary_device *auxdev)
{ … }
static void cp500_unregister_auxiliary_devs(struct cp500 *cp500)
{ … }
static irqreturn_t cp500_axi_handler(int irq, void *dev)
{ … }
static int cp500_enable(struct cp500 *cp500)
{ … }
static void cp500_disable(struct cp500 *cp500)
{ … }
static int cp500_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)
{ … }
static void cp500_remove(struct pci_dev *pci_dev)
{ … }
static struct pci_device_id cp500_ids[] = …;
MODULE_DEVICE_TABLE(pci, cp500_ids);
static struct pci_driver cp500_driver = …;
module_pci_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;