linux/drivers/gpio/gpio-sprd.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2018 Spreadtrum Communications Inc.
 * Copyright (C) 2018 Linaro Ltd.
 */

#include <linux/bitops.h>
#include <linux/gpio/driver.h>
#include <linux/kernel.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/spinlock.h>

/* GPIO registers definition */
#define SPRD_GPIO_DATA
#define SPRD_GPIO_DMSK
#define SPRD_GPIO_DIR
#define SPRD_GPIO_IS
#define SPRD_GPIO_IBE
#define SPRD_GPIO_IEV
#define SPRD_GPIO_IE
#define SPRD_GPIO_RIS
#define SPRD_GPIO_MIS
#define SPRD_GPIO_IC
#define SPRD_GPIO_INEN

/* We have 16 banks GPIOs and each bank contain 16 GPIOs */
#define SPRD_GPIO_BANK_NR
#define SPRD_GPIO_NR
#define SPRD_GPIO_BANK_SIZE
#define SPRD_GPIO_BANK_MASK
#define SPRD_GPIO_BIT(x)

struct sprd_gpio {};

static inline void __iomem *sprd_gpio_bank_base(struct sprd_gpio *sprd_gpio,
						unsigned int bank)
{}

static void sprd_gpio_update(struct gpio_chip *chip, unsigned int offset,
			     u16 reg, int val)
{}

static int sprd_gpio_read(struct gpio_chip *chip, unsigned int offset, u16 reg)
{}

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

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

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

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

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

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

static void sprd_gpio_irq_mask(struct irq_data *data)
{}

static void sprd_gpio_irq_ack(struct irq_data *data)
{}

static void sprd_gpio_irq_unmask(struct irq_data *data)
{}

static int sprd_gpio_irq_set_type(struct irq_data *data,
				  unsigned int flow_type)
{}

static void sprd_gpio_irq_handler(struct irq_desc *desc)
{}

static const struct irq_chip sprd_gpio_irqchip =;

static int sprd_gpio_probe(struct platform_device *pdev)
{}

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

static struct platform_driver sprd_gpio_driver =;

module_platform_driver_probe();

MODULE_DESCRIPTION();
MODULE_LICENSE();