linux/drivers/gpio/gpio-altera.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright (C) 2013 Altera Corporation
 * Based on gpio-mpc8xxx.c
 */

#include <linux/io.h>
#include <linux/module.h>
#include <linux/gpio/driver.h>
#include <linux/gpio/legacy-of-mm-gpiochip.h>
#include <linux/platform_device.h>

#define ALTERA_GPIO_MAX_NGPIO
#define ALTERA_GPIO_DATA
#define ALTERA_GPIO_DIR
#define ALTERA_GPIO_IRQ_MASK
#define ALTERA_GPIO_EDGE_CAP

/**
* struct altera_gpio_chip
* @mmchip		: memory mapped chip structure.
* @gpio_lock		: synchronization lock so that new irq/set/get requests
*			  will be blocked until the current one completes.
* @interrupt_trigger	: specifies the hardware configured IRQ trigger type
*			  (rising, falling, both, high)
* @mapped_irq		: kernel mapped irq number.
*/
struct altera_gpio_chip {};

static void altera_gpio_irq_unmask(struct irq_data *d)
{}

static void altera_gpio_irq_mask(struct irq_data *d)
{}

/*
 * This controller's IRQ type is synthesized in hardware, so this function
 * just checks if the requested set_type matches the synthesized IRQ type
 */
static int altera_gpio_irq_set_type(struct irq_data *d,
				   unsigned int type)
{}

static unsigned int altera_gpio_irq_startup(struct irq_data *d)
{}

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

static void altera_gpio_set(struct gpio_chip *gc, unsigned offset, int value)
{}

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

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

static void altera_gpio_irq_edge_handler(struct irq_desc *desc)
{}

static void altera_gpio_irq_leveL_high_handler(struct irq_desc *desc)
{}

static const struct irq_chip altera_gpio_irq_chip =;

static int altera_gpio_probe(struct platform_device *pdev)
{}

static void altera_gpio_remove(struct platform_device *pdev)
{}

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

static struct platform_driver altera_gpio_driver =;

static int __init altera_gpio_init(void)
{}
subsys_initcall(altera_gpio_init);

static void __exit altera_gpio_exit(void)
{}
module_exit(altera_gpio_exit);

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