linux/drivers/pinctrl/pinctrl-axp209.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * AXP20x pinctrl and GPIO driver
 *
 * Copyright (C) 2016 Maxime Ripard <[email protected]>
 * Copyright (C) 2017 Quentin Schulz <[email protected]>
 */

#include <linux/bitops.h>
#include <linux/device.h>
#include <linux/gpio/driver.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/mfd/axp20x.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/slab.h>

#include <linux/pinctrl/consumer.h>
#include <linux/pinctrl/pinconf-generic.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>

#define AXP20X_GPIO_FUNCTIONS
#define AXP20X_GPIO_FUNCTION_OUT_LOW
#define AXP20X_GPIO_FUNCTION_OUT_HIGH
#define AXP20X_GPIO_FUNCTION_INPUT

#define AXP20X_GPIO3_FUNCTIONS
#define AXP20X_GPIO3_FUNCTION_OUT_LOW
#define AXP20X_GPIO3_FUNCTION_OUT_HIGH
#define AXP20X_GPIO3_FUNCTION_INPUT

#define AXP20X_FUNC_GPIO_OUT
#define AXP20X_FUNC_GPIO_IN
#define AXP20X_FUNC_LDO
#define AXP20X_FUNC_ADC
#define AXP20X_FUNCS_NB

#define AXP20X_MUX_GPIO_OUT
#define AXP20X_MUX_GPIO_IN
#define AXP20X_MUX_ADC

#define AXP813_MUX_ADC

struct axp20x_pctrl_desc {};

struct axp20x_pinctrl_function {};

struct axp20x_pctl {};

static const struct pinctrl_pin_desc axp209_pins[] =;

static const struct pinctrl_pin_desc axp22x_pins[] =;

static const struct axp20x_pctrl_desc axp20x_data =;

static const struct axp20x_pctrl_desc axp22x_data =;

static const struct axp20x_pctrl_desc axp813_data =;

static int axp20x_gpio_get_reg(unsigned int offset)
{}

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

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

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

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

static int axp20x_pmx_set(struct pinctrl_dev *pctldev, unsigned int offset,
			  u8 config)
{}

static int axp20x_pmx_func_cnt(struct pinctrl_dev *pctldev)
{}

static const char *axp20x_pmx_func_name(struct pinctrl_dev *pctldev,
					unsigned int selector)
{}

static int axp20x_pmx_func_groups(struct pinctrl_dev *pctldev,
				  unsigned int selector,
				  const char * const **groups,
				  unsigned int *num_groups)
{}

static int axp20x_pmx_set_mux(struct pinctrl_dev *pctldev,
			      unsigned int function, unsigned int group)
{}

static int axp20x_pmx_gpio_set_direction(struct pinctrl_dev *pctldev,
					 struct pinctrl_gpio_range *range,
					 unsigned int offset, bool input)
{}

static const struct pinmux_ops axp20x_pmx_ops =;

static int axp20x_groups_cnt(struct pinctrl_dev *pctldev)
{}

static int axp20x_group_pins(struct pinctrl_dev *pctldev, unsigned int selector,
			     const unsigned int **pins, unsigned int *num_pins)
{}

static const char *axp20x_group_name(struct pinctrl_dev *pctldev,
				     unsigned int selector)
{}

static const struct pinctrl_ops axp20x_pctrl_ops =;

static int axp20x_funcs_groups_from_mask(struct device *dev, unsigned int mask,
					  unsigned int mask_len,
					  struct axp20x_pinctrl_function *func,
					  const struct pinctrl_pin_desc *pins)
{}

static int axp20x_build_funcs_groups(struct platform_device *pdev)
{}

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

static int axp20x_pctl_probe(struct platform_device *pdev)
{}

static struct platform_driver axp20x_pctl_driver =;

module_platform_driver();

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