#include <dt-bindings/pinctrl/mt65xx.h>
#include <linux/gpio/driver.h>
#include <linux/pinctrl/consumer.h>
#include "pinctrl-moore.h"
#define PINCTRL_PINCTRL_DEV …
#define MTK_PIN_CONFIG_TDSEL …
#define MTK_PIN_CONFIG_RDSEL …
#define MTK_PIN_CONFIG_PU_ADV …
#define MTK_PIN_CONFIG_PD_ADV …
static const struct pinconf_generic_params mtk_custom_bindings[] = …;
#ifdef CONFIG_DEBUG_FS
static const struct pin_config_item mtk_conf_items[] = …;
#endif
static int mtk_pinmux_set_mux(struct pinctrl_dev *pctldev,
unsigned int selector, unsigned int group)
{ … }
static int mtk_pinmux_gpio_request_enable(struct pinctrl_dev *pctldev,
struct pinctrl_gpio_range *range,
unsigned int pin)
{ … }
static int mtk_pinmux_gpio_set_direction(struct pinctrl_dev *pctldev,
struct pinctrl_gpio_range *range,
unsigned int pin, bool input)
{ … }
static int mtk_pinconf_get(struct pinctrl_dev *pctldev,
unsigned int pin, unsigned long *config)
{ … }
static int mtk_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin,
unsigned long *configs, unsigned int num_configs)
{ … }
static int mtk_pinconf_group_get(struct pinctrl_dev *pctldev,
unsigned int group, unsigned long *config)
{ … }
static int mtk_pinconf_group_set(struct pinctrl_dev *pctldev,
unsigned int group, unsigned long *configs,
unsigned int num_configs)
{ … }
static const struct pinctrl_ops mtk_pctlops = …;
static const struct pinmux_ops mtk_pmxops = …;
static const struct pinconf_ops mtk_confops = …;
static struct pinctrl_desc mtk_desc = …;
static int mtk_gpio_get(struct gpio_chip *chip, unsigned int gpio)
{ … }
static void mtk_gpio_set(struct gpio_chip *chip, unsigned int gpio, int value)
{ … }
static int mtk_gpio_direction_output(struct gpio_chip *chip, unsigned int gpio,
int value)
{ … }
static int mtk_gpio_to_irq(struct gpio_chip *chip, unsigned int offset)
{ … }
static int mtk_gpio_set_config(struct gpio_chip *chip, unsigned int offset,
unsigned long config)
{ … }
static int mtk_build_gpiochip(struct mtk_pinctrl *hw)
{ … }
static int mtk_build_groups(struct mtk_pinctrl *hw)
{ … }
static int mtk_build_functions(struct mtk_pinctrl *hw)
{ … }
int mtk_moore_pinctrl_probe(struct platform_device *pdev,
const struct mtk_pin_soc *soc)
{ … }