linux/drivers/gpio/gpio-brcmstb.c

// SPDX-License-Identifier: GPL-2.0-only
// Copyright (C) 2015-2017 Broadcom

#include <linux/bitops.h>
#include <linux/gpio/driver.h>
#include <linux/of.h>
#include <linux/module.h>
#include <linux/irqdomain.h>
#include <linux/irqchip/chained_irq.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>

enum gio_reg_index {};

#define GIO_BANK_SIZE
#define GIO_BANK_OFF(bank, off)
#define GIO_ODEN(bank)
#define GIO_DATA(bank)
#define GIO_IODIR(bank)
#define GIO_EC(bank)
#define GIO_EI(bank)
#define GIO_MASK(bank)
#define GIO_LEVEL(bank)
#define GIO_STAT(bank)

struct brcmstb_gpio_bank {};

struct brcmstb_gpio_priv {};

#define MAX_GPIO_PER_BANK
#define GPIO_BANK(gpio)
/* assumes MAX_GPIO_PER_BANK is a multiple of 2 */
#define GPIO_BIT(gpio)

static inline struct brcmstb_gpio_priv *
brcmstb_gpio_gc_to_priv(struct gpio_chip *gc)
{}

static unsigned long
__brcmstb_gpio_get_active_irqs(struct brcmstb_gpio_bank *bank)
{}

static unsigned long
brcmstb_gpio_get_active_irqs(struct brcmstb_gpio_bank *bank)
{}

static int brcmstb_gpio_hwirq_to_offset(irq_hw_number_t hwirq,
					struct brcmstb_gpio_bank *bank)
{}

static void brcmstb_gpio_set_imask(struct brcmstb_gpio_bank *bank,
		unsigned int hwirq, bool enable)
{}

static int brcmstb_gpio_to_irq(struct gpio_chip *gc, unsigned offset)
{}

/* -------------------- IRQ chip functions -------------------- */

static void brcmstb_gpio_irq_mask(struct irq_data *d)
{}

static void brcmstb_gpio_irq_unmask(struct irq_data *d)
{}

static void brcmstb_gpio_irq_ack(struct irq_data *d)
{}

static int brcmstb_gpio_irq_set_type(struct irq_data *d, unsigned int type)
{}

static int brcmstb_gpio_priv_set_wake(struct brcmstb_gpio_priv *priv,
		unsigned int enable)
{}

static int brcmstb_gpio_irq_set_wake(struct irq_data *d, unsigned int enable)
{}

static irqreturn_t brcmstb_gpio_wake_irq_handler(int irq, void *data)
{}

static void brcmstb_gpio_irq_bank_handler(struct brcmstb_gpio_bank *bank)
{}

/* Each UPG GIO block has one IRQ for all banks */
static void brcmstb_gpio_irq_handler(struct irq_desc *desc)
{}

static struct brcmstb_gpio_bank *brcmstb_gpio_hwirq_to_bank(
		struct brcmstb_gpio_priv *priv, irq_hw_number_t hwirq)
{}

/*
 * This lock class tells lockdep that GPIO irqs are in a different
 * category than their parents, so it won't report false recursion.
 */
static struct lock_class_key brcmstb_gpio_irq_lock_class;
static struct lock_class_key brcmstb_gpio_irq_request_class;


static int brcmstb_gpio_irq_map(struct irq_domain *d, unsigned int irq,
		irq_hw_number_t hwirq)
{}

static void brcmstb_gpio_irq_unmap(struct irq_domain *d, unsigned int irq)
{}

static const struct irq_domain_ops brcmstb_gpio_irq_domain_ops =;

/* Make sure that the number of banks matches up between properties */
static int brcmstb_gpio_sanity_check_banks(struct device *dev,
		struct device_node *np, struct resource *res)
{}

static void brcmstb_gpio_remove(struct platform_device *pdev)
{}

static int brcmstb_gpio_of_xlate(struct gpio_chip *gc,
		const struct of_phandle_args *gpiospec, u32 *flags)
{}

/* priv->parent_irq and priv->num_gpios must be set before calling */
static int brcmstb_gpio_irq_setup(struct platform_device *pdev,
		struct brcmstb_gpio_priv *priv)
{}

static void brcmstb_gpio_bank_save(struct brcmstb_gpio_priv *priv,
				   struct brcmstb_gpio_bank *bank)
{}

static void brcmstb_gpio_quiesce(struct device *dev, bool save)
{}

static void brcmstb_gpio_shutdown(struct platform_device *pdev)
{}

#ifdef CONFIG_PM_SLEEP
static void brcmstb_gpio_bank_restore(struct brcmstb_gpio_priv *priv,
				      struct brcmstb_gpio_bank *bank)
{}

static int brcmstb_gpio_suspend(struct device *dev)
{}

static int brcmstb_gpio_resume(struct device *dev)
{}

#else
#define brcmstb_gpio_suspend
#define brcmstb_gpio_resume
#endif /* CONFIG_PM_SLEEP */

static const struct dev_pm_ops brcmstb_gpio_pm_ops =;

static int brcmstb_gpio_probe(struct platform_device *pdev)
{}

static const struct of_device_id brcmstb_gpio_of_match[] =;

MODULE_DEVICE_TABLE(of, brcmstb_gpio_of_match);

static struct platform_driver brcmstb_gpio_driver =;
module_platform_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();