linux/drivers/gpio/gpio-syscon.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  SYSCON GPIO driver
 *
 *  Copyright (C) 2014 Alexander Shiyan <[email protected]>
 */

#include <linux/err.h>
#include <linux/gpio/driver.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/mfd/syscon.h>

#define GPIO_SYSCON_FEAT_IN
#define GPIO_SYSCON_FEAT_OUT
#define GPIO_SYSCON_FEAT_DIR

/* SYSCON driver is designed to use 32-bit wide registers */
#define SYSCON_REG_SIZE
#define SYSCON_REG_BITS

/**
 * struct syscon_gpio_data - Configuration for the device.
 * @compatible:		SYSCON driver compatible string.
 * @flags:		Set of GPIO_SYSCON_FEAT_ flags:
 *			GPIO_SYSCON_FEAT_IN:	GPIOs supports input,
 *			GPIO_SYSCON_FEAT_OUT:	GPIOs supports output,
 *			GPIO_SYSCON_FEAT_DIR:	GPIOs supports switch direction.
 * @bit_count:		Number of bits used as GPIOs.
 * @dat_bit_offset:	Offset (in bits) to the first GPIO bit.
 * @dir_bit_offset:	Optional offset (in bits) to the first bit to switch
 *			GPIO direction (Used with GPIO_SYSCON_FEAT_DIR flag).
 * @set:		HW specific callback to assigns output value
 *			for signal "offset"
 */

struct syscon_gpio_data {};

struct syscon_gpio_priv {};

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

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

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

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

static const struct syscon_gpio_data clps711x_mctrl_gpio =;

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

static const struct syscon_gpio_data rockchip_rk3328_gpio_mute =;

#define KEYSTONE_LOCK_BIT

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

static const struct syscon_gpio_data keystone_dsp_gpio =;

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

static int syscon_gpio_probe(struct platform_device *pdev)
{}

static struct platform_driver syscon_gpio_driver =;
module_platform_driver();

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