#include <linux/bitops.h>
#include <linux/clk.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>
#include <linux/pinctrl/pinconf-generic.h>
#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
#include "core.h"
#include "pinctrl-utils.h"
#define LPC18XX_SCU_REG_ENAIO0 …
#define LPC18XX_SCU_REG_ENAIO1 …
#define LPC18XX_SCU_REG_ENAIO2 …
#define LPC18XX_SCU_REG_ENAIO2_DAC …
#define LPC18XX_SCU_PIN_MODE_MASK …
#define LPC18XX_SCU_PIN_EPD …
#define LPC18XX_SCU_PIN_EPUN …
#define LPC18XX_SCU_PIN_EHS …
#define LPC18XX_SCU_PIN_EZI …
#define LPC18XX_SCU_PIN_ZIF …
#define LPC18XX_SCU_PIN_EHD_MASK …
#define LPC18XX_SCU_PIN_EHD_POS …
#define LPC18XX_SCU_USB1_EPD …
#define LPC18XX_SCU_USB1_EPWR …
#define LPC18XX_SCU_I2C0_EFP …
#define LPC18XX_SCU_I2C0_EHD …
#define LPC18XX_SCU_I2C0_EZI …
#define LPC18XX_SCU_I2C0_ZIF …
#define LPC18XX_SCU_I2C0_SCL_SHIFT …
#define LPC18XX_SCU_I2C0_SDA_SHIFT …
#define LPC18XX_SCU_FUNC_PER_PIN …
#define LPC18XX_SCU_PINTSEL0 …
#define LPC18XX_SCU_PINTSEL1 …
#define LPC18XX_SCU_PINTSEL_VAL_MASK …
#define LPC18XX_SCU_PINTSEL_PORT_SHIFT …
#define LPC18XX_SCU_IRQ_PER_PINTSEL …
#define LPC18XX_GPIO_PINS_PER_PORT …
#define LPC18XX_GPIO_PIN_INT_MAX …
#define LPC18XX_SCU_PINTSEL_VAL(val, n) …
enum { … };
enum { … };
static const char *const lpc18xx_function_names[] = …;
struct lpc18xx_pmx_func { … };
struct lpc18xx_scu_data { … };
struct lpc18xx_pin_caps { … };
#define LPC18XX_SCU_ANALOG_PIN_CFG …
#define LPC18XX_ANALOG_PIN …
#define LPC18XX_ANALOG_ADC(a) …
#define LPC18XX_ANALOG_BIT_MASK …
#define ADC0 …
#define ADC1 …
#define DAC …
#define LPC_P(port, pin, f0, f1, f2, f3, f4, f5, f6, f7, a, t) …
#define LPC_N(pname, off, f0, f1, f2, f3, f4, f5, f6, f7, a, t) …
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_P(…);
LPC_N(…);
LPC_N(…);
LPC_N(…);
LPC_N(…);
LPC_N(…);
LPC_N(…);
LPC_N(…);
LPC_N(…);
#define LPC18XX_PIN_P(port, pin) …
enum { … };
#define LPC18XX_PIN(pname, n) …
static const struct pinctrl_pin_desc lpc18xx_pins[] = …;
#define PIN_CONFIG_GPIO_PIN_INT …
static const struct pinconf_generic_params lpc18xx_params[] = …;
#ifdef CONFIG_DEBUG_FS
static const struct pin_config_item lpc18xx_conf_items[ARRAY_SIZE(lpc18xx_params)] = …;
#endif
static int lpc18xx_pconf_get_usb1(enum pin_config_param param, int *arg, u32 reg)
{ … }
static int lpc18xx_pconf_get_i2c0(enum pin_config_param param, int *arg, u32 reg,
unsigned pin)
{ … }
static int lpc18xx_pin_to_gpio(struct pinctrl_dev *pctldev, unsigned pin)
{ … }
static int lpc18xx_get_pintsel(void __iomem *addr, u32 val, int *arg)
{ … }
static u32 lpc18xx_gpio_to_pintsel_val(int gpio)
{ … }
static int lpc18xx_pconf_get_gpio_pin_int(struct pinctrl_dev *pctldev,
int *arg, unsigned pin)
{ … }
static int lpc18xx_pconf_get_pin(struct pinctrl_dev *pctldev, unsigned param,
int *arg, u32 reg, unsigned pin,
struct lpc18xx_pin_caps *pin_cap)
{ … }
static struct lpc18xx_pin_caps *lpc18xx_get_pin_caps(unsigned pin)
{ … }
static int lpc18xx_pconf_get(struct pinctrl_dev *pctldev, unsigned pin,
unsigned long *config)
{ … }
static int lpc18xx_pconf_set_usb1(struct pinctrl_dev *pctldev,
enum pin_config_param param,
u32 param_val, u32 *reg)
{ … }
static int lpc18xx_pconf_set_i2c0(struct pinctrl_dev *pctldev,
enum pin_config_param param,
u32 param_val, u32 *reg,
unsigned pin)
{ … }
static int lpc18xx_pconf_set_gpio_pin_int(struct pinctrl_dev *pctldev,
u32 param_val, unsigned pin)
{ … }
static int lpc18xx_pconf_set_pin(struct pinctrl_dev *pctldev, unsigned param,
u32 param_val, u32 *reg, unsigned pin,
struct lpc18xx_pin_caps *pin_cap)
{ … }
static int lpc18xx_pconf_set(struct pinctrl_dev *pctldev, unsigned pin,
unsigned long *configs, unsigned num_configs)
{ … }
static const struct pinconf_ops lpc18xx_pconf_ops = …;
static int lpc18xx_pmx_get_funcs_count(struct pinctrl_dev *pctldev)
{ … }
static const char *lpc18xx_pmx_get_func_name(struct pinctrl_dev *pctldev,
unsigned function)
{ … }
static int lpc18xx_pmx_get_func_groups(struct pinctrl_dev *pctldev,
unsigned function,
const char *const **groups,
unsigned *const num_groups)
{ … }
static int lpc18xx_pmx_set(struct pinctrl_dev *pctldev, unsigned function,
unsigned group)
{ … }
static const struct pinmux_ops lpc18xx_pmx_ops = …;
static int lpc18xx_pctl_get_groups_count(struct pinctrl_dev *pctldev)
{ … }
static const char *lpc18xx_pctl_get_group_name(struct pinctrl_dev *pctldev,
unsigned group)
{ … }
static int lpc18xx_pctl_get_group_pins(struct pinctrl_dev *pctldev,
unsigned group,
const unsigned **pins,
unsigned *num_pins)
{ … }
static const struct pinctrl_ops lpc18xx_pctl_ops = …;
static struct pinctrl_desc lpc18xx_scu_desc = …;
static bool lpc18xx_valid_pin_function(unsigned pin, unsigned function)
{ … }
static int lpc18xx_create_group_func_map(struct device *dev,
struct lpc18xx_scu_data *scu)
{ … }
static int lpc18xx_scu_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id lpc18xx_scu_match[] = …;
static struct platform_driver lpc18xx_scu_driver = …;
builtin_platform_driver(…) …;