linux/drivers/pinctrl/renesas/gpio.c

// SPDX-License-Identifier: GPL-2.0
/*
 * SuperH Pin Function Controller GPIO driver.
 *
 * Copyright (C) 2008 Magnus Damm
 * Copyright (C) 2009 - 2012 Paul Mundt
 */

#include <linux/device.h>
#include <linux/gpio/driver.h>
#include <linux/module.h>
#include <linux/pinctrl/consumer.h>
#include <linux/slab.h>
#include <linux/spinlock.h>

#include "core.h"

struct sh_pfc_gpio_data_reg {};

struct sh_pfc_gpio_pin {};

struct sh_pfc_chip {};

static struct sh_pfc *gpio_to_pfc(struct gpio_chip *gc)
{}

static void gpio_get_data_reg(struct sh_pfc_chip *chip, unsigned int offset,
			      struct sh_pfc_gpio_data_reg **reg,
			      unsigned int *bit)
{}

static u32 gpio_read_data_reg(struct sh_pfc_chip *chip,
			      const struct pinmux_data_reg *dreg)
{}

static void gpio_write_data_reg(struct sh_pfc_chip *chip,
				const struct pinmux_data_reg *dreg, u32 value)
{}

static void gpio_setup_data_reg(struct sh_pfc_chip *chip, unsigned idx)
{}

static int gpio_setup_data_regs(struct sh_pfc_chip *chip)
{}

/* -----------------------------------------------------------------------------
 * Pin GPIOs
 */

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

static void gpio_pin_free(struct gpio_chip *gc, unsigned offset)
{}

static void gpio_pin_set_value(struct sh_pfc_chip *chip, unsigned offset,
			       int value)
{}

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

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

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

static void gpio_pin_set(struct gpio_chip *gc, unsigned offset, int value)
{}

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

static int gpio_pin_setup(struct sh_pfc_chip *chip)
{}

/* -----------------------------------------------------------------------------
 * Function GPIOs
 */

#ifdef CONFIG_PINCTRL_SH_FUNC_GPIO
static int gpio_function_request(struct gpio_chip *gc, unsigned offset)
{}

static int gpio_function_setup(struct sh_pfc_chip *chip)
{}
#endif /* CONFIG_PINCTRL_SH_FUNC_GPIO */

/* -----------------------------------------------------------------------------
 * Register/unregister
 */

static struct sh_pfc_chip *
sh_pfc_add_gpiochip(struct sh_pfc *pfc, int(*setup)(struct sh_pfc_chip *),
		    struct sh_pfc_window *mem)
{}

int sh_pfc_register_gpiochip(struct sh_pfc *pfc)
{}