#include <linux/gpio/driver.h>
#include <linux/gpio/regmap.h>
#include <linux/module.h>
#include <linux/pinctrl/pinmux.h>
#include <linux/platform_device.h>
#include <linux/mod_devicetable.h>
#include <linux/mfd/tps6594.h>
#define TPS6594_PINCTRL_GPIO_FUNCTION …
#define TPS6594_PINCTRL_SCL_I2C2_CS_SPI_FUNCTION …
#define TPS6594_PINCTRL_TRIG_WDOG_FUNCTION …
#define TPS6594_PINCTRL_CLK32KOUT_FUNCTION …
#define TPS6594_PINCTRL_SCLK_SPMI_FUNCTION …
#define TPS6594_PINCTRL_SDATA_SPMI_FUNCTION …
#define TPS6594_PINCTRL_NERR_MCU_FUNCTION …
#define TPS6594_PINCTRL_PDOG_FUNCTION …
#define TPS6594_PINCTRL_SYNCCLKIN_FUNCTION …
#define TPS6594_PINCTRL_NRSTOUT_SOC_FUNCTION …
#define TPS6594_PINCTRL_SYNCCLKOUT_FUNCTION …
#define TPS6594_PINCTRL_SDA_I2C2_SDO_SPI_FUNCTION …
#define TPS6594_PINCTRL_NERR_SOC_FUNCTION …
#define TPS6594_PINCTRL_DISABLE_WDOG_FUNCTION …
#define TPS6594_PINCTRL_NSLEEP1_FUNCTION …
#define TPS6594_PINCTRL_NSLEEP2_FUNCTION …
#define TPS6594_PINCTRL_WKUP1_FUNCTION …
#define TPS6594_PINCTRL_WKUP2_FUNCTION …
#define TPS6594_PINCTRL_DISABLE_WDOG_FUNCTION_GPIO8 …
#define TPS6594_PINCTRL_SYNCCLKOUT_FUNCTION_GPIO8 …
#define TPS6594_PINCTRL_CLK32KOUT_FUNCTION_GPIO9 …
#define TPS65224_PINCTRL_SDA_I2C2_SDO_SPI_FUNCTION …
#define TPS65224_PINCTRL_SCL_I2C2_CS_SPI_FUNCTION …
#define TPS65224_PINCTRL_VMON1_FUNCTION …
#define TPS65224_PINCTRL_VMON2_FUNCTION …
#define TPS65224_PINCTRL_WKUP_FUNCTION …
#define TPS65224_PINCTRL_NSLEEP2_FUNCTION …
#define TPS65224_PINCTRL_NSLEEP1_FUNCTION …
#define TPS65224_PINCTRL_SYNCCLKIN_FUNCTION …
#define TPS65224_PINCTRL_NERR_MCU_FUNCTION …
#define TPS65224_PINCTRL_NINT_FUNCTION …
#define TPS65224_PINCTRL_TRIG_WDOG_FUNCTION …
#define TPS65224_PINCTRL_PB_FUNCTION …
#define TPS65224_PINCTRL_ADC_IN_FUNCTION …
#define TPS65224_PINCTRL_NSLEEP2_FUNCTION_GPIO5 …
#define TPS65224_PINCTRL_WKUP_FUNCTION_GPIO5 …
#define TPS65224_PINCTRL_SYNCCLKIN_FUNCTION_GPIO5 …
#define TPS6594_OFFSET_GPIO_SEL …
#define TPS65224_NGPIO_PER_REG …
#define TPS6594_NGPIO_PER_REG …
#define FUNCTION(dev_name, fname, v) …
static const struct pinctrl_pin_desc tps6594_pins[] = …;
static const char *const tps6594_gpio_func_group_names[] = …;
static const char *const tps6594_nsleep1_func_group_names[] = …;
static const char *const tps6594_nsleep2_func_group_names[] = …;
static const char *const tps6594_wkup1_func_group_names[] = …;
static const char *const tps6594_wkup2_func_group_names[] = …;
static const char *const tps6594_scl_i2c2_cs_spi_func_group_names[] = …;
static const char *const tps6594_nrstout_soc_func_group_names[] = …;
static const char *const tps6594_trig_wdog_func_group_names[] = …;
static const char *const tps6594_sda_i2c2_sdo_spi_func_group_names[] = …;
static const char *const tps6594_clk32kout_func_group_names[] = …;
static const char *const tps6594_nerr_soc_func_group_names[] = …;
static const char *const tps6594_sclk_spmi_func_group_names[] = …;
static const char *const tps6594_sdata_spmi_func_group_names[] = …;
static const char *const tps6594_nerr_mcu_func_group_names[] = …;
static const char *const tps6594_syncclkout_func_group_names[] = …;
static const char *const tps6594_disable_wdog_func_group_names[] = …;
static const char *const tps6594_pdog_func_group_names[] = …;
static const char *const tps6594_syncclkin_func_group_names[] = …;
static const struct pinctrl_pin_desc tps65224_pins[] = …;
static const char *const tps65224_gpio_func_group_names[] = …;
static const char *const tps65224_sda_i2c2_sdo_spi_func_group_names[] = …;
static const char *const tps65224_nsleep2_func_group_names[] = …;
static const char *const tps65224_nint_func_group_names[] = …;
static const char *const tps65224_scl_i2c2_cs_spi_func_group_names[] = …;
static const char *const tps65224_nsleep1_func_group_names[] = …;
static const char *const tps65224_trig_wdog_func_group_names[] = …;
static const char *const tps65224_vmon1_func_group_names[] = …;
static const char *const tps65224_pb_func_group_names[] = …;
static const char *const tps65224_vmon2_func_group_names[] = …;
static const char *const tps65224_adc_in_func_group_names[] = …;
static const char *const tps65224_wkup_func_group_names[] = …;
static const char *const tps65224_syncclkin_func_group_names[] = …;
static const char *const tps65224_nerr_mcu_func_group_names[] = …;
struct tps6594_pinctrl_function { … };
struct muxval_remap { … };
static struct muxval_remap tps65224_muxval_remap[] = …;
static struct muxval_remap tps6594_muxval_remap[] = …;
static const struct tps6594_pinctrl_function pinctrl_functions[] = …;
static const struct tps6594_pinctrl_function tps65224_pinctrl_functions[] = …;
struct tps6594_pinctrl { … };
static struct tps6594_pinctrl tps65224_template_pinctrl = …;
static struct tps6594_pinctrl tps6594_template_pinctrl = …;
static int tps6594_gpio_regmap_xlate(struct gpio_regmap *gpio,
unsigned int base, unsigned int offset,
unsigned int *reg, unsigned int *mask)
{ … }
static int tps6594_pmx_func_cnt(struct pinctrl_dev *pctldev)
{ … }
static const char *tps6594_pmx_func_name(struct pinctrl_dev *pctldev,
unsigned int selector)
{ … }
static int tps6594_pmx_func_groups(struct pinctrl_dev *pctldev,
unsigned int selector,
const char *const **groups,
unsigned int *num_groups)
{ … }
static int tps6594_pmx_set(struct tps6594_pinctrl *pinctrl, unsigned int pin,
u8 muxval)
{ … }
static int tps6594_pmx_set_mux(struct pinctrl_dev *pctldev,
unsigned int function, unsigned int group)
{ … }
static int tps6594_pmx_gpio_set_direction(struct pinctrl_dev *pctldev,
struct pinctrl_gpio_range *range,
unsigned int offset, bool input)
{ … }
static const struct pinmux_ops tps6594_pmx_ops = …;
static int tps6594_groups_cnt(struct pinctrl_dev *pctldev)
{ … }
static int tps6594_group_pins(struct pinctrl_dev *pctldev,
unsigned int selector, const unsigned int **pins,
unsigned int *num_pins)
{ … }
static const char *tps6594_group_name(struct pinctrl_dev *pctldev,
unsigned int selector)
{ … }
static const struct pinctrl_ops tps6594_pctrl_ops = …;
static int tps6594_pinctrl_probe(struct platform_device *pdev)
{ … }
static const struct platform_device_id tps6594_pinctrl_id_table[] = …;
MODULE_DEVICE_TABLE(platform, tps6594_pinctrl_id_table);
static struct platform_driver tps6594_pinctrl_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;