#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/device.h>
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/dma-mapping.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/pm_domain.h>
#include <linux/pm_runtime.h>
#include <linux/mei.h>
#include "mei_dev.h"
#include "client.h"
#include "hw-me-regs.h"
#include "hw-me.h"
static const struct pci_device_id mei_me_pci_tbl[] = …;
MODULE_DEVICE_TABLE(pci, mei_me_pci_tbl);
#ifdef CONFIG_PM
static inline void mei_me_set_pm_domain(struct mei_device *dev);
static inline void mei_me_unset_pm_domain(struct mei_device *dev);
#else
static inline void mei_me_set_pm_domain(struct mei_device *dev) {}
static inline void mei_me_unset_pm_domain(struct mei_device *dev) {}
#endif
static int mei_me_read_fws(const struct mei_device *dev, int where, u32 *val)
{ … }
static bool mei_me_quirk_probe(struct pci_dev *pdev,
const struct mei_cfg *cfg)
{ … }
static int mei_me_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{ … }
static void mei_me_shutdown(struct pci_dev *pdev)
{ … }
static void mei_me_remove(struct pci_dev *pdev)
{ … }
#ifdef CONFIG_PM_SLEEP
static int mei_me_pci_prepare(struct device *device)
{ … }
static int mei_me_pci_suspend(struct device *device)
{ … }
static int mei_me_pci_resume(struct device *device)
{ … }
static void mei_me_pci_complete(struct device *device)
{ … }
#else
#define mei_me_pci_prepare …
#define mei_me_pci_complete …
#endif
#ifdef CONFIG_PM
static int mei_me_pm_runtime_idle(struct device *device)
{ … }
static int mei_me_pm_runtime_suspend(struct device *device)
{ … }
static int mei_me_pm_runtime_resume(struct device *device)
{ … }
static inline void mei_me_set_pm_domain(struct mei_device *dev)
{ … }
static inline void mei_me_unset_pm_domain(struct mei_device *dev)
{ … }
static const struct dev_pm_ops mei_me_pm_ops = …;
#define MEI_ME_PM_OPS …
#else
#define MEI_ME_PM_OPS …
#endif
static struct pci_driver mei_me_driver = …;
module_pci_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;