linux/drivers/gpio/gpio-xgene-sb.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * AppliedMicro X-Gene SoC GPIO-Standby Driver
 *
 * Copyright (c) 2014, Applied Micro Circuits Corporation
 * Author:	Tin Huynh <[email protected]>.
 *		Y Vo <[email protected]>.
 *		Quan Nguyen <[email protected]>.
 */

#include <linux/module.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/gpio/driver.h>
#include <linux/acpi.h>

#include "gpiolib-acpi.h"

/* Common property names */
#define XGENE_NIRQ_PROPERTY
#define XGENE_NGPIO_PROPERTY
#define XGENE_IRQ_START_PROPERTY

#define XGENE_DFLT_MAX_NGPIO
#define XGENE_DFLT_MAX_NIRQ
#define XGENE_DFLT_IRQ_START_PIN
#define GPIO_MASK(x)

#define MPA_GPIO_INT_LVL
#define MPA_GPIO_OE_ADDR
#define MPA_GPIO_OUT_ADDR
#define MPA_GPIO_IN_ADDR
#define MPA_GPIO_SEL_LO

#define GPIO_INT_LEVEL_H
#define GPIO_INT_LEVEL_L

/**
 * struct xgene_gpio_sb - GPIO-Standby private data structure.
 * @gc:				memory-mapped GPIO controllers.
 * @regs:			GPIO register base offset
 * @irq_domain:			GPIO interrupt domain
 * @irq_start:			GPIO pin that start support interrupt
 * @nirq:			Number of GPIO pins that supports interrupt
 * @parent_irq_base:		Start parent HWIRQ
 */
struct xgene_gpio_sb {};

#define HWIRQ_TO_GPIO(priv, hwirq)
#define GPIO_TO_HWIRQ(priv, gpio)

static void xgene_gpio_set_bit(struct gpio_chip *gc,
				void __iomem *reg, u32 gpio, int val)
{}

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

static struct irq_chip xgene_gpio_sb_irq_chip =;

static int xgene_gpio_sb_to_irq(struct gpio_chip *gc, u32 gpio)
{}

static int xgene_gpio_sb_domain_activate(struct irq_domain *d,
					 struct irq_data *irq_data,
					 bool reserve)
{}

static void xgene_gpio_sb_domain_deactivate(struct irq_domain *d,
		struct irq_data *irq_data)
{}

static int xgene_gpio_sb_domain_translate(struct irq_domain *d,
		struct irq_fwspec *fwspec,
		unsigned long *hwirq,
		unsigned int *type)
{}

static int xgene_gpio_sb_domain_alloc(struct irq_domain *domain,
					unsigned int virq,
					unsigned int nr_irqs, void *data)
{}

static const struct irq_domain_ops xgene_gpio_sb_domain_ops =;

static int xgene_gpio_sb_probe(struct platform_device *pdev)
{}

static void xgene_gpio_sb_remove(struct platform_device *pdev)
{}

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

#ifdef CONFIG_ACPI
static const struct acpi_device_id xgene_gpio_sb_acpi_match[] =;
MODULE_DEVICE_TABLE(acpi, xgene_gpio_sb_acpi_match);
#endif

static struct platform_driver xgene_gpio_sb_driver =;
module_platform_driver();

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