#include <linux/gpio/driver.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinconf-generic.h>
#include <linux/pinctrl/pinmux.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include "core.h"
#include "pinconf.h"
#include "pinmux.h"
#include "pinctrl-equilibrium.h"
#define PIN_NAME_FMT …
#define PIN_NAME_LEN …
#define PAD_REG_OFF …
static void eqbr_gpio_disable_irq(struct irq_data *d)
{ … }
static void eqbr_gpio_enable_irq(struct irq_data *d)
{ … }
static void eqbr_gpio_ack_irq(struct irq_data *d)
{ … }
static void eqbr_gpio_mask_ack_irq(struct irq_data *d)
{ … }
static inline void eqbr_cfg_bit(void __iomem *addr,
unsigned int offset, unsigned int set)
{ … }
static int eqbr_irq_type_cfg(struct gpio_irq_type *type,
struct eqbr_gpio_ctrl *gctrl,
unsigned int offset)
{ … }
static int eqbr_gpio_set_irq_type(struct irq_data *d, unsigned int type)
{ … }
static void eqbr_irq_handler(struct irq_desc *desc)
{ … }
static const struct irq_chip eqbr_irq_chip = …;
static int gpiochip_setup(struct device *dev, struct eqbr_gpio_ctrl *gctrl)
{ … }
static int gpiolib_reg(struct eqbr_pinctrl_drv_data *drvdata)
{ … }
static inline struct eqbr_pin_bank
*find_pinbank_via_pin(struct eqbr_pinctrl_drv_data *pctl, unsigned int pin)
{ … }
static const struct pinctrl_ops eqbr_pctl_ops = …;
static int eqbr_set_pin_mux(struct eqbr_pinctrl_drv_data *pctl,
unsigned int pmx, unsigned int pin)
{ … }
static int eqbr_pinmux_set_mux(struct pinctrl_dev *pctldev,
unsigned int selector, unsigned int group)
{ … }
static int eqbr_pinmux_gpio_request(struct pinctrl_dev *pctldev,
struct pinctrl_gpio_range *range,
unsigned int pin)
{ … }
static const struct pinmux_ops eqbr_pinmux_ops = …;
static int get_drv_cur(void __iomem *mem, unsigned int offset)
{ … }
static struct eqbr_gpio_ctrl
*get_gpio_ctrls_via_bank(struct eqbr_pinctrl_drv_data *pctl,
struct eqbr_pin_bank *bank)
{ … }
static int eqbr_pinconf_get(struct pinctrl_dev *pctldev, unsigned int pin,
unsigned long *config)
{ … }
static int eqbr_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin,
unsigned long *configs, unsigned int num_configs)
{ … }
static int eqbr_pinconf_group_get(struct pinctrl_dev *pctldev,
unsigned int group, unsigned long *config)
{ … }
static int eqbr_pinconf_group_set(struct pinctrl_dev *pctldev,
unsigned int group, unsigned long *configs,
unsigned int num_configs)
{ … }
static const struct pinconf_ops eqbr_pinconf_ops = …;
static bool is_func_exist(struct pinfunction *funcs, const char *name,
unsigned int nr_funcs, unsigned int *idx)
{ … }
static int funcs_utils(struct device *dev, struct pinfunction *funcs,
unsigned int *nr_funcs, funcs_util_ops op)
{ … }
static int eqbr_build_functions(struct eqbr_pinctrl_drv_data *drvdata)
{ … }
static int eqbr_build_groups(struct eqbr_pinctrl_drv_data *drvdata)
{ … }
static int pinctrl_reg(struct eqbr_pinctrl_drv_data *drvdata)
{ … }
static int pinbank_init(struct device_node *np,
struct eqbr_pinctrl_drv_data *drvdata,
struct eqbr_pin_bank *bank, unsigned int id)
{ … }
static int pinbank_probe(struct eqbr_pinctrl_drv_data *drvdata)
{ … }
static int eqbr_pinctrl_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id eqbr_pinctrl_dt_match[] = …;
MODULE_DEVICE_TABLE(of, eqbr_pinctrl_dt_match);
static struct platform_driver eqbr_pinctrl_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;