#include <linux/bitops.h>
#include <linux/gpio/driver.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/spinlock.h>
#define GPIO_CONST_GPIOS_MASK 0xff
#define GPIO_BIT_CFG 0x400
#define GPIO_BIT_CFG_TX_OE BIT(0)
#define GPIO_BIT_CFG_PIN_XOR BIT(1)
#define GPIO_BIT_CFG_INT_EN BIT(2)
#define GPIO_BIT_CFG_INT_TYPE BIT(3)
#define GPIO_BIT_CFG_FIL_MASK GENMASK(11, 4)
#define GPIO_BIT_CFG_FIL_CNT_SHIFT 4
#define GPIO_BIT_CFG_FIL_SEL_SHIFT 8
#define GPIO_BIT_CFG_TX_OD BIT(12)
#define GPIO_BIT_CFG_PIN_SEL_MASK GENMASK(25, 16)
#define GPIO_INTR_INTR BIT(0)
#define GPIO_INTR_INTR_W1S BIT(1)
#define GPIO_INTR_ENA_W1C BIT(2)
#define GPIO_INTR_ENA_W1S BIT(3)
#define GPIO_2ND_BANK 0x1400
#define GLITCH_FILTER_400NS ((4u << GPIO_BIT_CFG_FIL_SEL_SHIFT) | \
(9u << GPIO_BIT_CFG_FIL_CNT_SHIFT))
struct thunderx_gpio *txgpio;
u8 __iomem *register_base;
struct msix_entry *msix_entries;
struct thunderx_line *line_entries;
unsigned long invert_mask[2];
unsigned long od_mask[2];