linux/drivers/gpio/gpio-regmap.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * regmap based generic GPIO driver
 *
 * Copyright 2020 Michael Walle <[email protected]>
 */

#include <linux/bits.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <linux/types.h>

#include <linux/gpio/driver.h>
#include <linux/gpio/regmap.h>

struct gpio_regmap {};

static unsigned int gpio_regmap_addr(unsigned int addr)
{}

static int gpio_regmap_simple_xlate(struct gpio_regmap *gpio,
				    unsigned int base, unsigned int offset,
				    unsigned int *reg, unsigned int *mask)
{}

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

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

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

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

static int gpio_regmap_set_direction(struct gpio_chip *chip,
				     unsigned int offset, bool output)
{}

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

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

void *gpio_regmap_get_drvdata(struct gpio_regmap *gpio)
{}
EXPORT_SYMBOL_GPL();

/**
 * gpio_regmap_register() - Register a generic regmap GPIO controller
 * @config: configuration for gpio_regmap
 *
 * Return: A pointer to the registered gpio_regmap or ERR_PTR error value.
 */
struct gpio_regmap *gpio_regmap_register(const struct gpio_regmap_config *config)
{}
EXPORT_SYMBOL_GPL();

/**
 * gpio_regmap_unregister() - Unregister a generic regmap GPIO controller
 * @gpio: gpio_regmap device to unregister
 */
void gpio_regmap_unregister(struct gpio_regmap *gpio)
{}
EXPORT_SYMBOL_GPL();

static void devm_gpio_regmap_unregister(void *res)
{}

/**
 * devm_gpio_regmap_register() - resource managed gpio_regmap_register()
 * @dev: device that is registering this GPIO device
 * @config: configuration for gpio_regmap
 *
 * Managed gpio_regmap_register(). For generic regmap GPIO device registered by
 * this function, gpio_regmap_unregister() is automatically called on driver
 * detach. See gpio_regmap_register() for more information.
 *
 * Return: A pointer to the registered gpio_regmap or ERR_PTR error value.
 */
struct gpio_regmap *devm_gpio_regmap_register(struct device *dev,
					      const struct gpio_regmap_config *config)
{}
EXPORT_SYMBOL_GPL();

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