linux/drivers/gpio/gpio-tqmx86.c

// SPDX-License-Identifier: GPL-2.0
/*
 * TQ-Systems TQMx86 PLD GPIO driver
 *
 * Based on vendor driver by:
 *   Vadim V.Vlasov <[email protected]>
 */

#include <linux/bitmap.h>
#include <linux/bitops.h>
#include <linux/errno.h>
#include <linux/gpio/driver.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/seq_file.h>
#include <linux/slab.h>

#define TQMX86_NGPIO
#define TQMX86_NGPO
#define TQMX86_NGPI
#define TQMX86_DIR_INPUT_MASK

#define TQMX86_GPIODD
#define TQMX86_GPIOD
#define TQMX86_GPIIC
#define TQMX86_GPIIS

#define TQMX86_GPII_NONE
#define TQMX86_GPII_FALLING
#define TQMX86_GPII_RISING
/* Stored in irq_type as a trigger type, but not actually valid as a register
 * value, so the name doesn't use "GPII"
 */
#define TQMX86_INT_BOTH
#define TQMX86_GPII_MASK
#define TQMX86_GPII_BITS
/* Stored in irq_type with GPII bits */
#define TQMX86_INT_UNMASKED

struct tqmx86_gpio_data {};

static u8 tqmx86_gpio_read(struct tqmx86_gpio_data *gd, unsigned int reg)
{}

static void tqmx86_gpio_write(struct tqmx86_gpio_data *gd, u8 val,
			      unsigned int reg)
{}

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

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

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

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

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

static void tqmx86_gpio_irq_config(struct tqmx86_gpio_data *gpio, int offset)
	__must_hold(&gpio->spinlock)
{}

static void tqmx86_gpio_irq_mask(struct irq_data *data)
{}

static void tqmx86_gpio_irq_unmask(struct irq_data *data)
{}

static int tqmx86_gpio_irq_set_type(struct irq_data *data, unsigned int type)
{}

static void tqmx86_gpio_irq_handler(struct irq_desc *desc)
{}

/* Minimal runtime PM is needed by the IRQ subsystem */
static int __maybe_unused tqmx86_gpio_runtime_suspend(struct device *dev)
{}

static int __maybe_unused tqmx86_gpio_runtime_resume(struct device *dev)
{}

static const struct dev_pm_ops tqmx86_gpio_dev_pm_ops =;

static void tqmx86_init_irq_valid_mask(struct gpio_chip *chip,
				       unsigned long *valid_mask,
				       unsigned int ngpios)
{}

static void tqmx86_gpio_irq_print_chip(struct irq_data *d, struct seq_file *p)
{}

static const struct irq_chip tqmx86_gpio_irq_chip =;

static int tqmx86_gpio_probe(struct platform_device *pdev)
{}

static struct platform_driver tqmx86_gpio_driver =;

module_platform_driver();

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