linux/drivers/gpio/gpio-bcm-kona.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Broadcom Kona GPIO Driver
 *
 * Author: Broadcom Corporation <[email protected]>
 * Copyright (C) 2012-2014 Broadcom Corporation
 */

#include <linux/bitops.h>
#include <linux/err.h>
#include <linux/gpio/driver.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/irqdomain.h>
#include <linux/irqchip/chained_irq.h>
#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>
#include <linux/property.h>

#define BCM_GPIO_PASSWD
#define GPIO_PER_BANK
#define GPIO_MAX_BANK_NUM

#define GPIO_BANK(gpio)
#define GPIO_BIT(gpio)

/* There is a GPIO control register for each GPIO */
#define GPIO_CONTROL(gpio)

/* The remaining registers are per GPIO bank */
#define GPIO_OUT_STATUS(bank)
#define GPIO_IN_STATUS(bank)
#define GPIO_OUT_SET(bank)
#define GPIO_OUT_CLEAR(bank)
#define GPIO_INT_STATUS(bank)
#define GPIO_INT_MASK(bank)
#define GPIO_INT_MSKCLR(bank)
#define GPIO_PWD_STATUS(bank)

#define GPIO_GPPWR_OFFSET

#define GPIO_GPCTR0_DBR_SHIFT
#define GPIO_GPCTR0_DBR_MASK

#define GPIO_GPCTR0_ITR_SHIFT
#define GPIO_GPCTR0_ITR_MASK
#define GPIO_GPCTR0_ITR_CMD_RISING_EDGE
#define GPIO_GPCTR0_ITR_CMD_FALLING_EDGE
#define GPIO_GPCTR0_ITR_CMD_BOTH_EDGE

#define GPIO_GPCTR0_IOTR_MASK
#define GPIO_GPCTR0_IOTR_CMD_0UTPUT
#define GPIO_GPCTR0_IOTR_CMD_INPUT

#define GPIO_GPCTR0_DB_ENABLE_MASK

#define LOCK_CODE
#define UNLOCK_CODE

struct bcm_kona_gpio {};

struct bcm_kona_gpio_bank {};

static inline void bcm_kona_gpio_write_lock_regs(void __iomem *reg_base,
						int bank_id, u32 lockcode)
{}

static void bcm_kona_gpio_lock_gpio(struct bcm_kona_gpio *kona_gpio,
					unsigned gpio)
{}

static void bcm_kona_gpio_unlock_gpio(struct bcm_kona_gpio *kona_gpio,
					unsigned gpio)
{}

static int bcm_kona_gpio_get_dir(struct gpio_chip *chip, unsigned gpio)
{}

static void bcm_kona_gpio_set(struct gpio_chip *chip, unsigned gpio, int value)
{}

static int bcm_kona_gpio_get(struct gpio_chip *chip, unsigned gpio)
{}

static int bcm_kona_gpio_request(struct gpio_chip *chip, unsigned gpio)
{}

static void bcm_kona_gpio_free(struct gpio_chip *chip, unsigned gpio)
{}

static int bcm_kona_gpio_direction_input(struct gpio_chip *chip, unsigned gpio)
{}

static int bcm_kona_gpio_direction_output(struct gpio_chip *chip,
					  unsigned gpio, int value)
{}

static int bcm_kona_gpio_to_irq(struct gpio_chip *chip, unsigned gpio)
{}

static int bcm_kona_gpio_set_debounce(struct gpio_chip *chip, unsigned gpio,
				      unsigned debounce)
{}

static int bcm_kona_gpio_set_config(struct gpio_chip *chip, unsigned gpio,
				    unsigned long config)
{}

static const struct gpio_chip template_chip =;

static void bcm_kona_gpio_irq_ack(struct irq_data *d)
{}

static void bcm_kona_gpio_irq_mask(struct irq_data *d)
{}

static void bcm_kona_gpio_irq_unmask(struct irq_data *d)
{}

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

static void bcm_kona_gpio_irq_handler(struct irq_desc *desc)
{}

static int bcm_kona_gpio_irq_reqres(struct irq_data *d)
{}

static void bcm_kona_gpio_irq_relres(struct irq_data *d)
{}

static struct irq_chip bcm_gpio_irq_chip =;

static struct of_device_id const bcm_kona_gpio_of_match[] =;

/*
 * 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 gpio_lock_class;
static struct lock_class_key gpio_request_class;

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

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

static const struct irq_domain_ops bcm_kona_irq_ops =;

static void bcm_kona_gpio_reset(struct bcm_kona_gpio *kona_gpio)
{}

static int bcm_kona_gpio_probe(struct platform_device *pdev)
{}

static struct platform_driver bcm_kona_gpio_driver =;
builtin_platform_driver();