#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/pci.h>
#include <linux/pm_runtime.h>
#include "m_can.h"
#define M_CAN_PCI_MMIO_BAR …
#define M_CAN_CLOCK_FREQ_EHL …
#define CTL_CSR_INT_CTL_OFFSET …
struct m_can_pci_priv { … };
static inline struct m_can_pci_priv *cdev_to_priv(struct m_can_classdev *cdev)
{ … }
static u32 iomap_read_reg(struct m_can_classdev *cdev, int reg)
{ … }
static int iomap_read_fifo(struct m_can_classdev *cdev, int offset, void *val, size_t val_count)
{ … }
static int iomap_write_reg(struct m_can_classdev *cdev, int reg, int val)
{ … }
static int iomap_write_fifo(struct m_can_classdev *cdev, int offset,
const void *val, size_t val_count)
{ … }
static const struct m_can_ops m_can_pci_ops = …;
static int m_can_pci_probe(struct pci_dev *pci, const struct pci_device_id *id)
{ … }
static void m_can_pci_remove(struct pci_dev *pci)
{ … }
static __maybe_unused int m_can_pci_suspend(struct device *dev)
{ … }
static __maybe_unused int m_can_pci_resume(struct device *dev)
{ … }
static SIMPLE_DEV_PM_OPS(m_can_pci_pm_ops,
m_can_pci_suspend, m_can_pci_resume);
static const struct pci_device_id m_can_pci_id_table[] = …;
MODULE_DEVICE_TABLE(pci, m_can_pci_id_table);
static struct pci_driver m_can_pci_driver = …;
module_pci_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;