linux/drivers/gpio/gpio-mt7621.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2009-2011 Gabor Juhos <[email protected]>
 * Copyright (C) 2013 John Crispin <[email protected]>
 */

#include <linux/err.h>
#include <linux/gpio/driver.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/spinlock.h>

#define MTK_BANK_CNT
#define MTK_BANK_WIDTH

#define GPIO_BANK_STRIDE
#define GPIO_REG_CTRL
#define GPIO_REG_POL
#define GPIO_REG_DATA
#define GPIO_REG_DSET
#define GPIO_REG_DCLR
#define GPIO_REG_REDGE
#define GPIO_REG_FEDGE
#define GPIO_REG_HLVL
#define GPIO_REG_LLVL
#define GPIO_REG_STAT
#define GPIO_REG_EDGE

struct mtk_gc {};

/**
 * struct mtk - state container for
 * data of the platform driver. It is 3
 * separate gpio-chip each one with its
 * own irq_chip.
 * @dev: device instance
 * @base: memory base address
 * @gpio_irq: irq number from the device tree
 * @gc_map: array of the gpio chips
 */
struct mtk {};

static inline struct mtk_gc *
to_mediatek_gpio(struct gpio_chip *chip)
{}

static inline void
mtk_gpio_w32(struct mtk_gc *rg, u32 offset, u32 val)
{}

static inline u32
mtk_gpio_r32(struct mtk_gc *rg, u32 offset)
{}

static irqreturn_t
mediatek_gpio_irq_handler(int irq, void *data)
{}

static void
mediatek_gpio_irq_unmask(struct irq_data *d)
{}

static void
mediatek_gpio_irq_mask(struct irq_data *d)
{}

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

static int
mediatek_gpio_xlate(struct gpio_chip *chip,
		    const struct of_phandle_args *spec, u32 *flags)
{}

static const struct irq_chip mt7621_irq_chip =;

static int
mediatek_gpio_bank_probe(struct device *dev, int bank)
{}

static int
mediatek_gpio_probe(struct platform_device *pdev)
{}

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

static struct platform_driver mediatek_gpio_driver =;

builtin_platform_driver();