drivers/pinctrl/pinctrl-tps6594.c
Source file repositories/reference/linux-study-clean/drivers/pinctrl/pinctrl-tps6594.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/pinctrl/pinctrl-tps6594.c- Extension
.c- Size
- 18030 bytes
- Lines
- 583
- Domain
- Driver Families
- Bucket
- drivers/pinctrl
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/gpio/driver.hlinux/gpio/regmap.hlinux/module.hlinux/pinctrl/pinmux.hlinux/platform_device.hlinux/mod_devicetable.hlinux/mfd/tps6594.h
Detected Declarations
struct tps6594_pinctrl_functionstruct muxval_remapstruct tps6594_pinctrlfunction tps6594_gpio_regmap_xlatefunction tps6594_pmx_func_cntfunction tps6594_pmx_func_groupsfunction tps6594_pmx_setfunction tps6594_pmx_set_muxfunction tps6594_pmx_gpio_set_directionfunction tps6594_groups_cntfunction tps6594_group_pinsfunction tps6594_pinctrl_probe
Annotated Snippet
struct tps6594_pinctrl_function {
struct pinfunction pinfunction;
u8 muxval;
};
struct muxval_remap {
unsigned int group;
u8 muxval;
u8 remap;
};
static struct muxval_remap tps65224_muxval_remap[] = {
{5, TPS6594_PINCTRL_DISABLE_WDOG_FUNCTION, TPS65224_PINCTRL_WKUP_FUNCTION_GPIO5},
{5, TPS65224_PINCTRL_SYNCCLKIN_FUNCTION, TPS65224_PINCTRL_SYNCCLKIN_FUNCTION_GPIO5},
{5, TPS65224_PINCTRL_NSLEEP2_FUNCTION, TPS65224_PINCTRL_NSLEEP2_FUNCTION_GPIO5},
};
static struct muxval_remap tps6594_muxval_remap[] = {
{8, TPS6594_PINCTRL_DISABLE_WDOG_FUNCTION, TPS6594_PINCTRL_DISABLE_WDOG_FUNCTION_GPIO8},
{8, TPS6594_PINCTRL_SYNCCLKOUT_FUNCTION, TPS6594_PINCTRL_SYNCCLKOUT_FUNCTION_GPIO8},
{9, TPS6594_PINCTRL_CLK32KOUT_FUNCTION, TPS6594_PINCTRL_CLK32KOUT_FUNCTION_GPIO9},
};
static const struct tps6594_pinctrl_function pinctrl_functions[] = {
FUNCTION(tps6594, gpio, TPS6594_PINCTRL_GPIO_FUNCTION),
FUNCTION(tps6594, nsleep1, TPS6594_PINCTRL_NSLEEP1_FUNCTION),
FUNCTION(tps6594, nsleep2, TPS6594_PINCTRL_NSLEEP2_FUNCTION),
FUNCTION(tps6594, wkup1, TPS6594_PINCTRL_WKUP1_FUNCTION),
FUNCTION(tps6594, wkup2, TPS6594_PINCTRL_WKUP2_FUNCTION),
FUNCTION(tps6594, scl_i2c2_cs_spi, TPS6594_PINCTRL_SCL_I2C2_CS_SPI_FUNCTION),
FUNCTION(tps6594, nrstout_soc, TPS6594_PINCTRL_NRSTOUT_SOC_FUNCTION),
FUNCTION(tps6594, trig_wdog, TPS6594_PINCTRL_TRIG_WDOG_FUNCTION),
FUNCTION(tps6594, sda_i2c2_sdo_spi, TPS6594_PINCTRL_SDA_I2C2_SDO_SPI_FUNCTION),
FUNCTION(tps6594, clk32kout, TPS6594_PINCTRL_CLK32KOUT_FUNCTION),
FUNCTION(tps6594, nerr_soc, TPS6594_PINCTRL_NERR_SOC_FUNCTION),
FUNCTION(tps6594, sclk_spmi, TPS6594_PINCTRL_SCLK_SPMI_FUNCTION),
FUNCTION(tps6594, sdata_spmi, TPS6594_PINCTRL_SDATA_SPMI_FUNCTION),
FUNCTION(tps6594, nerr_mcu, TPS6594_PINCTRL_NERR_MCU_FUNCTION),
FUNCTION(tps6594, syncclkout, TPS6594_PINCTRL_SYNCCLKOUT_FUNCTION),
FUNCTION(tps6594, disable_wdog, TPS6594_PINCTRL_DISABLE_WDOG_FUNCTION),
FUNCTION(tps6594, pdog, TPS6594_PINCTRL_PDOG_FUNCTION),
FUNCTION(tps6594, syncclkin, TPS6594_PINCTRL_SYNCCLKIN_FUNCTION),
};
static const struct tps6594_pinctrl_function tps65224_pinctrl_functions[] = {
FUNCTION(tps65224, gpio, TPS6594_PINCTRL_GPIO_FUNCTION),
FUNCTION(tps65224, sda_i2c2_sdo_spi, TPS65224_PINCTRL_SDA_I2C2_SDO_SPI_FUNCTION),
FUNCTION(tps65224, nsleep2, TPS65224_PINCTRL_NSLEEP2_FUNCTION),
FUNCTION(tps65224, nint, TPS65224_PINCTRL_NINT_FUNCTION),
FUNCTION(tps65224, scl_i2c2_cs_spi, TPS65224_PINCTRL_SCL_I2C2_CS_SPI_FUNCTION),
FUNCTION(tps65224, nsleep1, TPS65224_PINCTRL_NSLEEP1_FUNCTION),
FUNCTION(tps65224, trig_wdog, TPS65224_PINCTRL_TRIG_WDOG_FUNCTION),
FUNCTION(tps65224, vmon1, TPS65224_PINCTRL_VMON1_FUNCTION),
FUNCTION(tps65224, pb, TPS65224_PINCTRL_PB_FUNCTION),
FUNCTION(tps65224, vmon2, TPS65224_PINCTRL_VMON2_FUNCTION),
FUNCTION(tps65224, adc_in, TPS65224_PINCTRL_ADC_IN_FUNCTION),
FUNCTION(tps65224, wkup, TPS65224_PINCTRL_WKUP_FUNCTION),
FUNCTION(tps65224, syncclkin, TPS65224_PINCTRL_SYNCCLKIN_FUNCTION),
FUNCTION(tps65224, nerr_mcu, TPS65224_PINCTRL_NERR_MCU_FUNCTION),
};
static const struct tps6594_pinctrl_function tps652g1_pinctrl_functions[] = {
FUNCTION(tps65224, gpio, TPS6594_PINCTRL_GPIO_FUNCTION),
FUNCTION(tps65224, sda_i2c2_sdo_spi, TPS65224_PINCTRL_SDA_I2C2_SDO_SPI_FUNCTION),
FUNCTION(tps65224, nsleep2, TPS65224_PINCTRL_NSLEEP2_FUNCTION),
FUNCTION(tps65224, nint, TPS65224_PINCTRL_NINT_FUNCTION),
FUNCTION(tps652g1, cs_spi, TPS65224_PINCTRL_SCL_I2C2_CS_SPI_FUNCTION),
FUNCTION(tps65224, nsleep1, TPS65224_PINCTRL_NSLEEP1_FUNCTION),
FUNCTION(tps65224, pb, TPS65224_PINCTRL_PB_FUNCTION),
FUNCTION(tps65224, wkup, TPS65224_PINCTRL_WKUP_FUNCTION),
FUNCTION(tps65224, syncclkin, TPS65224_PINCTRL_SYNCCLKIN_FUNCTION),
};
struct tps6594_pinctrl {
struct tps6594 *tps;
struct gpio_regmap *gpio_regmap;
struct pinctrl_dev *pctl_dev;
const struct tps6594_pinctrl_function *funcs;
const struct pinctrl_pin_desc *pins;
int func_cnt;
int num_pins;
u8 mux_sel_mask;
unsigned int remap_cnt;
struct muxval_remap *remap;
};
static struct tps6594_pinctrl tps652g1_template_pinctrl = {
.funcs = tps652g1_pinctrl_functions,
.func_cnt = ARRAY_SIZE(tps652g1_pinctrl_functions),
.pins = tps65224_pins,
Annotation
- Immediate include surface: `linux/gpio/driver.h`, `linux/gpio/regmap.h`, `linux/module.h`, `linux/pinctrl/pinmux.h`, `linux/platform_device.h`, `linux/mod_devicetable.h`, `linux/mfd/tps6594.h`.
- Detected declarations: `struct tps6594_pinctrl_function`, `struct muxval_remap`, `struct tps6594_pinctrl`, `function tps6594_gpio_regmap_xlate`, `function tps6594_pmx_func_cnt`, `function tps6594_pmx_func_groups`, `function tps6594_pmx_set`, `function tps6594_pmx_set_mux`, `function tps6594_pmx_gpio_set_direction`, `function tps6594_groups_cnt`.
- Atlas domain: Driver Families / drivers/pinctrl.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.