#include <linux/bitops.h>
#include <linux/gpio/driver.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/irq.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/spinlock.h>
#define GPIO_RX_DAT …
#define GPIO_TX_SET …
#define GPIO_TX_CLR …
#define GPIO_CONST …
#define GPIO_CONST_GPIOS_MASK …
#define GPIO_BIT_CFG …
#define GPIO_BIT_CFG_TX_OE …
#define GPIO_BIT_CFG_PIN_XOR …
#define GPIO_BIT_CFG_INT_EN …
#define GPIO_BIT_CFG_INT_TYPE …
#define GPIO_BIT_CFG_FIL_MASK …
#define GPIO_BIT_CFG_FIL_CNT_SHIFT …
#define GPIO_BIT_CFG_FIL_SEL_SHIFT …
#define GPIO_BIT_CFG_TX_OD …
#define GPIO_BIT_CFG_PIN_SEL_MASK …
#define GPIO_INTR …
#define GPIO_INTR_INTR …
#define GPIO_INTR_INTR_W1S …
#define GPIO_INTR_ENA_W1C …
#define GPIO_INTR_ENA_W1S …
#define GPIO_2ND_BANK …
#define GLITCH_FILTER_400NS …
struct thunderx_gpio;
struct thunderx_line { … };
struct thunderx_gpio { … };
static unsigned int bit_cfg_reg(unsigned int line)
{ … }
static unsigned int intr_reg(unsigned int line)
{ … }
static bool thunderx_gpio_is_gpio_nowarn(struct thunderx_gpio *txgpio,
unsigned int line)
{ … }
static bool thunderx_gpio_is_gpio(struct thunderx_gpio *txgpio,
unsigned int line)
{ … }
static int thunderx_gpio_request(struct gpio_chip *chip, unsigned int line)
{ … }
static int thunderx_gpio_dir_in(struct gpio_chip *chip, unsigned int line)
{ … }
static void thunderx_gpio_set(struct gpio_chip *chip, unsigned int line,
int value)
{ … }
static int thunderx_gpio_dir_out(struct gpio_chip *chip, unsigned int line,
int value)
{ … }
static int thunderx_gpio_get_direction(struct gpio_chip *chip, unsigned int line)
{ … }
static int thunderx_gpio_set_config(struct gpio_chip *chip,
unsigned int line,
unsigned long cfg)
{ … }
static int thunderx_gpio_get(struct gpio_chip *chip, unsigned int line)
{ … }
static void thunderx_gpio_set_multiple(struct gpio_chip *chip,
unsigned long *mask,
unsigned long *bits)
{ … }
static void thunderx_gpio_irq_ack(struct irq_data *d)
{ … }
static void thunderx_gpio_irq_mask(struct irq_data *d)
{ … }
static void thunderx_gpio_irq_mask_ack(struct irq_data *d)
{ … }
static void thunderx_gpio_irq_unmask(struct irq_data *d)
{ … }
static int thunderx_gpio_irq_set_type(struct irq_data *d,
unsigned int flow_type)
{ … }
static void thunderx_gpio_irq_enable(struct irq_data *d)
{ … }
static void thunderx_gpio_irq_disable(struct irq_data *d)
{ … }
static const struct irq_chip thunderx_gpio_irq_chip = …;
static int thunderx_gpio_child_to_parent_hwirq(struct gpio_chip *gc,
unsigned int child,
unsigned int child_type,
unsigned int *parent,
unsigned int *parent_type)
{ … }
static int thunderx_gpio_populate_parent_alloc_info(struct gpio_chip *chip,
union gpio_irq_fwspec *gfwspec,
unsigned int parent_hwirq,
unsigned int parent_type)
{ … }
static int thunderx_gpio_probe(struct pci_dev *pdev,
const struct pci_device_id *id)
{ … }
static void thunderx_gpio_remove(struct pci_dev *pdev)
{ … }
static const struct pci_device_id thunderx_gpio_id_table[] = …;
MODULE_DEVICE_TABLE(pci, thunderx_gpio_id_table);
static struct pci_driver thunderx_gpio_driver = …;
module_pci_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;