#include <linux/bits.h>
#include <linux/gpio/driver.h>
#include <linux/irq.h>
#include <linux/irqdomain.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_irq.h>
#include <linux/platform_device.h>
#include <linux/spinlock.h>
#include <dt-bindings/gpio/uniphier-gpio.h>
#define UNIPHIER_GPIO_IRQ_MAX_NUM …
#define UNIPHIER_GPIO_PORT_DATA …
#define UNIPHIER_GPIO_PORT_DIR …
#define UNIPHIER_GPIO_IRQ_EN …
#define UNIPHIER_GPIO_IRQ_MODE …
#define UNIPHIER_GPIO_IRQ_FLT_EN …
#define UNIPHIER_GPIO_IRQ_FLT_CYC …
struct uniphier_gpio_priv { … };
static unsigned int uniphier_gpio_bank_to_reg(unsigned int bank)
{ … }
static void uniphier_gpio_get_bank_and_mask(unsigned int offset,
unsigned int *bank, u32 *mask)
{ … }
static void uniphier_gpio_reg_update(struct uniphier_gpio_priv *priv,
unsigned int reg, u32 mask, u32 val)
{ … }
static void uniphier_gpio_bank_write(struct gpio_chip *chip, unsigned int bank,
unsigned int reg, u32 mask, u32 val)
{ … }
static void uniphier_gpio_offset_write(struct gpio_chip *chip,
unsigned int offset, unsigned int reg,
int val)
{ … }
static int uniphier_gpio_offset_read(struct gpio_chip *chip,
unsigned int offset, unsigned int reg)
{ … }
static int uniphier_gpio_get_direction(struct gpio_chip *chip,
unsigned int offset)
{ … }
static int uniphier_gpio_direction_input(struct gpio_chip *chip,
unsigned int offset)
{ … }
static int uniphier_gpio_direction_output(struct gpio_chip *chip,
unsigned int offset, int val)
{ … }
static int uniphier_gpio_get(struct gpio_chip *chip, unsigned int offset)
{ … }
static void uniphier_gpio_set(struct gpio_chip *chip,
unsigned int offset, int val)
{ … }
static void uniphier_gpio_set_multiple(struct gpio_chip *chip,
unsigned long *mask, unsigned long *bits)
{ … }
static int uniphier_gpio_to_irq(struct gpio_chip *chip, unsigned int offset)
{ … }
static void uniphier_gpio_irq_mask(struct irq_data *data)
{ … }
static void uniphier_gpio_irq_unmask(struct irq_data *data)
{ … }
static int uniphier_gpio_irq_set_type(struct irq_data *data, unsigned int type)
{ … }
static int uniphier_gpio_irq_get_parent_hwirq(struct uniphier_gpio_priv *priv,
unsigned int hwirq)
{ … }
static int uniphier_gpio_irq_domain_translate(struct irq_domain *domain,
struct irq_fwspec *fwspec,
unsigned long *out_hwirq,
unsigned int *out_type)
{ … }
static int uniphier_gpio_irq_domain_alloc(struct irq_domain *domain,
unsigned int virq,
unsigned int nr_irqs, void *arg)
{ … }
static int uniphier_gpio_irq_domain_activate(struct irq_domain *domain,
struct irq_data *data, bool early)
{ … }
static void uniphier_gpio_irq_domain_deactivate(struct irq_domain *domain,
struct irq_data *data)
{ … }
static const struct irq_domain_ops uniphier_gpio_irq_domain_ops = …;
static void uniphier_gpio_hw_init(struct uniphier_gpio_priv *priv)
{ … }
static unsigned int uniphier_gpio_get_nbanks(unsigned int ngpio)
{ … }
static int uniphier_gpio_probe(struct platform_device *pdev)
{ … }
static void uniphier_gpio_remove(struct platform_device *pdev)
{ … }
static int __maybe_unused uniphier_gpio_suspend(struct device *dev)
{ … }
static int __maybe_unused uniphier_gpio_resume(struct device *dev)
{ … }
static const struct dev_pm_ops uniphier_gpio_pm_ops = …;
static const struct of_device_id uniphier_gpio_match[] = …;
MODULE_DEVICE_TABLE(of, uniphier_gpio_match);
static struct platform_driver uniphier_gpio_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;