linux/drivers/gpio/gpio-grgpio.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Driver for Aeroflex Gaisler GRGPIO General Purpose I/O cores.
 *
 * 2013 (c) Aeroflex Gaisler AB
 *
 * This driver supports the GRGPIO GPIO core available in the GRLIB VHDL
 * IP core library.
 *
 * Full documentation of the GRGPIO core can be found here:
 * http://www.gaisler.com/products/grlib/grip.pdf
 *
 * See "Documentation/devicetree/bindings/gpio/gpio-grgpio.txt" for
 * information on open firmware properties.
 *
 * Contributors: Andreas Larsson <[email protected]>
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/spinlock.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/gpio/driver.h>
#include <linux/slab.h>
#include <linux/err.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/irqdomain.h>
#include <linux/bitops.h>

#define GRGPIO_MAX_NGPIO

#define GRGPIO_DATA
#define GRGPIO_OUTPUT
#define GRGPIO_DIR
#define GRGPIO_IMASK
#define GRGPIO_IPOL
#define GRGPIO_IEDGE
#define GRGPIO_BYPASS
#define GRGPIO_IMAP_BASE

/* Structure for an irq of the core - called an underlying irq */
struct grgpio_uirq {};

/*
 * Structure for an irq of a gpio line handed out by this driver. The index is
 * used to map to the corresponding underlying irq.
 */
struct grgpio_lirq {};

struct grgpio_priv {};

static void grgpio_set_imask(struct grgpio_priv *priv, unsigned int offset,
			     int val)
{}

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

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

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

static void grgpio_irq_mask(struct irq_data *d)
{}

static void grgpio_irq_unmask(struct irq_data *d)
{}

static struct irq_chip grgpio_irq_chip =;

static irqreturn_t grgpio_irq_handler(int irq, void *dev)
{}

/*
 * This function will be called as a consequence of the call to
 * irq_create_mapping in grgpio_to_irq
 */
static int grgpio_irq_map(struct irq_domain *d, unsigned int irq,
			  irq_hw_number_t hwirq)
{}

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

static const struct irq_domain_ops grgpio_irq_domain_ops =;

/* ------------------------------------------------------------ */

static int grgpio_probe(struct platform_device *ofdev)
{}

static void grgpio_remove(struct platform_device *ofdev)
{}

static const struct of_device_id grgpio_match[] =;

MODULE_DEVICE_TABLE(of, grgpio_match);

static struct platform_driver grgpio_driver =;
module_platform_driver();

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