linux/drivers/gpio/gpio-tegra.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * arch/arm/mach-tegra/gpio.c
 *
 * Copyright (c) 2010 Google, Inc
 * Copyright (c) 2011-2016, NVIDIA CORPORATION.  All rights reserved.
 *
 * Author:
 *	Erik Gilling <[email protected]>
 */

#include <linux/err.h>
#include <linux/init.h>
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/gpio/driver.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/module.h>
#include <linux/seq_file.h>
#include <linux/irqdomain.h>
#include <linux/irqchip/chained_irq.h>
#include <linux/pinctrl/consumer.h>
#include <linux/pm.h>

#define GPIO_BANK(x)
#define GPIO_PORT(x)
#define GPIO_BIT(x)

#define GPIO_REG(tgi, x)

#define GPIO_CNF(t, x)
#define GPIO_OE(t, x)
#define GPIO_OUT(t, x)
#define GPIO_IN(t, x)
#define GPIO_INT_STA(t, x)
#define GPIO_INT_ENB(t, x)
#define GPIO_INT_LVL(t, x)
#define GPIO_INT_CLR(t, x)
#define GPIO_DBC_CNT(t, x)


#define GPIO_MSK_CNF(t, x)
#define GPIO_MSK_OE(t, x)
#define GPIO_MSK_OUT(t, x)
#define GPIO_MSK_DBC_EN(t, x)
#define GPIO_MSK_INT_STA(t, x)
#define GPIO_MSK_INT_ENB(t, x)
#define GPIO_MSK_INT_LVL(t, x)

#define GPIO_INT_LVL_MASK
#define GPIO_INT_LVL_EDGE_RISING
#define GPIO_INT_LVL_EDGE_FALLING
#define GPIO_INT_LVL_EDGE_BOTH
#define GPIO_INT_LVL_LEVEL_HIGH
#define GPIO_INT_LVL_LEVEL_LOW

struct tegra_gpio_info;

struct tegra_gpio_bank {};

struct tegra_gpio_soc_config {};

struct tegra_gpio_info {};

static inline void tegra_gpio_writel(struct tegra_gpio_info *tgi,
				     u32 val, u32 reg)
{}

static inline u32 tegra_gpio_readl(struct tegra_gpio_info *tgi, u32 reg)
{}

static unsigned int tegra_gpio_compose(unsigned int bank, unsigned int port,
				       unsigned int bit)
{}

static void tegra_gpio_mask_write(struct tegra_gpio_info *tgi, u32 reg,
				  unsigned int gpio, u32 value)
{}

static void tegra_gpio_enable(struct tegra_gpio_info *tgi, unsigned int gpio)
{}

static void tegra_gpio_disable(struct tegra_gpio_info *tgi, unsigned int gpio)
{}

static void tegra_gpio_free(struct gpio_chip *chip, unsigned int offset)
{}

static void tegra_gpio_set(struct gpio_chip *chip, unsigned int offset,
			   int value)
{}

static int tegra_gpio_get(struct gpio_chip *chip, unsigned int offset)
{}

static int tegra_gpio_direction_input(struct gpio_chip *chip,
				      unsigned int offset)
{}

static int tegra_gpio_direction_output(struct gpio_chip *chip,
				       unsigned int offset,
				       int value)
{}

static int tegra_gpio_get_direction(struct gpio_chip *chip,
				    unsigned int offset)
{}

static int tegra_gpio_set_debounce(struct gpio_chip *chip, unsigned int offset,
				   unsigned int debounce)
{}

static int tegra_gpio_set_config(struct gpio_chip *chip, unsigned int offset,
				 unsigned long config)
{}

static void tegra_gpio_irq_ack(struct irq_data *d)
{}

static void tegra_gpio_irq_mask(struct irq_data *d)
{}

static void tegra_gpio_irq_unmask(struct irq_data *d)
{}

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

static void tegra_gpio_irq_shutdown(struct irq_data *d)
{}

static void tegra_gpio_irq_handler(struct irq_desc *desc)
{}

static int tegra_gpio_child_to_parent_hwirq(struct gpio_chip *chip,
					    unsigned int hwirq,
					    unsigned int type,
					    unsigned int *parent_hwirq,
					    unsigned int *parent_type)
{}

static int tegra_gpio_populate_parent_fwspec(struct gpio_chip *chip,
					     union gpio_irq_fwspec *gfwspec,
					     unsigned int parent_hwirq,
					     unsigned int parent_type)
{}

#ifdef CONFIG_PM_SLEEP
static int tegra_gpio_resume(struct device *dev)
{}

static int tegra_gpio_suspend(struct device *dev)
{}

static int tegra_gpio_irq_set_wake(struct irq_data *d, unsigned int enable)
{}
#endif

static int tegra_gpio_irq_set_affinity(struct irq_data *data,
				       const struct cpumask *dest,
				       bool force)
{}

static int tegra_gpio_irq_request_resources(struct irq_data *d)
{}

static void tegra_gpio_irq_release_resources(struct irq_data *d)
{}

static void tegra_gpio_irq_print_chip(struct irq_data *d, struct seq_file *s)
{}

static const struct irq_chip tegra_gpio_irq_chip =;

static const struct irq_chip tegra210_gpio_irq_chip =;

#ifdef	CONFIG_DEBUG_FS

#include <linux/debugfs.h>

static int tegra_dbg_gpio_show(struct seq_file *s, void *unused)
{}

static void tegra_gpio_debuginit(struct tegra_gpio_info *tgi)
{}

#else

static inline void tegra_gpio_debuginit(struct tegra_gpio_info *tgi)
{
}

#endif

static const struct dev_pm_ops tegra_gpio_pm_ops =;

static const struct of_device_id tegra_pmc_of_match[] =;

static int tegra_gpio_probe(struct platform_device *pdev)
{}

static const struct tegra_gpio_soc_config tegra20_gpio_config =;

static const struct tegra_gpio_soc_config tegra30_gpio_config =;

static const struct tegra_gpio_soc_config tegra210_gpio_config =;

static const struct of_device_id tegra_gpio_of_match[] =;
MODULE_DEVICE_TABLE(of, tegra_gpio_of_match);

static struct platform_driver tegra_gpio_driver =;
module_platform_driver();

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