#include <linux/bits.h>
#include <linux/gpio/driver.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/slab.h>
#define PCH_EDGE_FALLING …
#define PCH_EDGE_RISING …
#define PCH_LEVEL_L …
#define PCH_LEVEL_H …
#define PCH_EDGE_BOTH …
#define PCH_IM_MASK …
#define PCH_IRQ_BASE …
struct pch_regs { … };
#define PCI_DEVICE_ID_INTEL_EG20T_PCH …
#define PCI_DEVICE_ID_ROHM_ML7223m_IOH …
#define PCI_DEVICE_ID_ROHM_ML7223n_IOH …
#define PCI_DEVICE_ID_ROHM_EG20T_PCH …
enum pch_type_t { … };
static int gpio_pins[] = …;
struct pch_gpio_reg_data { … };
struct pch_gpio { … };
static void pch_gpio_set(struct gpio_chip *gpio, unsigned int nr, int val)
{ … }
static int pch_gpio_get(struct gpio_chip *gpio, unsigned int nr)
{ … }
static int pch_gpio_direction_output(struct gpio_chip *gpio, unsigned int nr,
int val)
{ … }
static int pch_gpio_direction_input(struct gpio_chip *gpio, unsigned int nr)
{ … }
static void __maybe_unused pch_gpio_save_reg_conf(struct pch_gpio *chip)
{ … }
static void __maybe_unused pch_gpio_restore_reg_conf(struct pch_gpio *chip)
{ … }
static int pch_gpio_to_irq(struct gpio_chip *gpio, unsigned int offset)
{ … }
static void pch_gpio_setup(struct pch_gpio *chip)
{ … }
static int pch_irq_type(struct irq_data *d, unsigned int type)
{ … }
static void pch_irq_unmask(struct irq_data *d)
{ … }
static void pch_irq_mask(struct irq_data *d)
{ … }
static void pch_irq_ack(struct irq_data *d)
{ … }
static irqreturn_t pch_gpio_handler(int irq, void *dev_id)
{ … }
static int pch_gpio_alloc_generic_chip(struct pch_gpio *chip,
unsigned int irq_start,
unsigned int num)
{ … }
static int pch_gpio_probe(struct pci_dev *pdev,
const struct pci_device_id *id)
{ … }
static int __maybe_unused pch_gpio_suspend(struct device *dev)
{ … }
static int __maybe_unused pch_gpio_resume(struct device *dev)
{ … }
static SIMPLE_DEV_PM_OPS(pch_gpio_pm_ops, pch_gpio_suspend, pch_gpio_resume);
static const struct pci_device_id pch_gpio_pcidev_id[] = …;
MODULE_DEVICE_TABLE(pci, pch_gpio_pcidev_id);
static struct pci_driver pch_gpio_driver = …;
module_pci_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;