drivers/pinctrl/pinctrl-palmas.c
Source file repositories/reference/linux-study-clean/drivers/pinctrl/pinctrl-palmas.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/pinctrl/pinctrl-palmas.c- Extension
.c- Size
- 32656 bytes
- Lines
- 1051
- 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/delay.hlinux/module.hlinux/mfd/palmas.hlinux/of.hlinux/platform_device.hlinux/pinctrl/machine.hlinux/pinctrl/pinctrl.hlinux/pinctrl/pinconf-generic.hlinux/pinctrl/pinconf.hlinux/pinctrl/pinmux.hlinux/pm.hlinux/slab.hcore.hpinconf.hpinctrl-utils.h
Detected Declarations
struct palmas_pin_functionstruct palmas_pctrl_chip_infostruct palmas_pins_pullup_dn_infostruct palmas_pins_od_infostruct palmas_pin_infostruct palmas_pingroupstruct palmas_pinctrl_dataenum palmas_pinmuxfunction palmas_pinctrl_get_pin_muxfunction palmas_pinctrl_set_dvfs1function palmas_pinctrl_set_dvfs2function palmas_pinctrl_get_groups_countfunction palmas_pinctrl_get_group_pinsfunction palmas_pinctrl_get_funcs_countfunction palmas_pinctrl_get_func_groupsfunction palmas_pinctrl_set_muxfunction palmas_pinconf_getfunction palmas_pinconf_setfunction palmas_pinctrl_probe
Annotated Snippet
struct palmas_pin_function {
const char *name;
const char * const *groups;
unsigned ngroups;
};
struct palmas_pctrl_chip_info {
struct device *dev;
struct pinctrl_dev *pctl;
struct palmas *palmas;
int pins_current_opt[PALMAS_PIN_NUM];
const struct palmas_pin_function *functions;
unsigned num_functions;
const struct palmas_pingroup *pin_groups;
int num_pin_groups;
const struct pinctrl_pin_desc *pins;
unsigned num_pins;
};
static const struct pinctrl_pin_desc palmas_pins_desc[] = {
PINCTRL_PIN(PALMAS_PIN_GPIO0_ID, "gpio0"),
PINCTRL_PIN(PALMAS_PIN_GPIO1_VBUS_LED1_PWM1, "gpio1"),
PINCTRL_PIN(PALMAS_PIN_GPIO2_REGEN_LED2_PWM2, "gpio2"),
PINCTRL_PIN(PALMAS_PIN_GPIO3_CHRG_DET, "gpio3"),
PINCTRL_PIN(PALMAS_PIN_GPIO4_SYSEN1, "gpio4"),
PINCTRL_PIN(PALMAS_PIN_GPIO5_CLK32KGAUDIO_USB_PSEL, "gpio5"),
PINCTRL_PIN(PALMAS_PIN_GPIO6_SYSEN2, "gpio6"),
PINCTRL_PIN(PALMAS_PIN_GPIO7_MSECURE_PWRHOLD, "gpio7"),
PINCTRL_PIN(PALMAS_PIN_GPIO8_SIM1RSTI, "gpio8"),
PINCTRL_PIN(PALMAS_PIN_GPIO9_LOW_VBAT, "gpio9"),
PINCTRL_PIN(PALMAS_PIN_GPIO10_WIRELESS_CHRG1, "gpio10"),
PINCTRL_PIN(PALMAS_PIN_GPIO11_RCM, "gpio11"),
PINCTRL_PIN(PALMAS_PIN_GPIO12_SIM2RSTO, "gpio12"),
PINCTRL_PIN(PALMAS_PIN_GPIO13, "gpio13"),
PINCTRL_PIN(PALMAS_PIN_GPIO14, "gpio14"),
PINCTRL_PIN(PALMAS_PIN_GPIO15_SIM2RSTI, "gpio15"),
PINCTRL_PIN(PALMAS_PIN_VAC, "vac"),
PINCTRL_PIN(PALMAS_PIN_POWERGOOD_USB_PSEL, "powergood"),
PINCTRL_PIN(PALMAS_PIN_NRESWARM, "nreswarm"),
PINCTRL_PIN(PALMAS_PIN_PWRDOWN, "pwrdown"),
PINCTRL_PIN(PALMAS_PIN_GPADC_START, "gpadc_start"),
PINCTRL_PIN(PALMAS_PIN_RESET_IN, "reset_in"),
PINCTRL_PIN(PALMAS_PIN_NSLEEP, "nsleep"),
PINCTRL_PIN(PALMAS_PIN_ENABLE1, "enable1"),
PINCTRL_PIN(PALMAS_PIN_ENABLE2, "enable2"),
PINCTRL_PIN(PALMAS_PIN_INT, "int"),
};
static const char * const opt0_groups[] = {
"gpio0",
"gpio1",
"gpio2",
"gpio3",
"gpio4",
"gpio5",
"gpio6",
"gpio7",
"gpio8",
"gpio9",
"gpio10",
"gpio11",
"gpio12",
"gpio13",
"gpio14",
"gpio15",
"vac",
"powergood",
"nreswarm",
"pwrdown",
"gpadc_start",
"reset_in",
"nsleep",
"enable1",
"enable2",
"int",
};
static const char * const opt1_groups[] = {
"gpio0",
"gpio1",
"gpio2",
"gpio3",
"gpio4",
"gpio5",
"gpio6",
"gpio7",
"gpio8",
"gpio9",
"gpio10",
"gpio11",
Annotation
- Immediate include surface: `linux/delay.h`, `linux/module.h`, `linux/mfd/palmas.h`, `linux/of.h`, `linux/platform_device.h`, `linux/pinctrl/machine.h`, `linux/pinctrl/pinctrl.h`, `linux/pinctrl/pinconf-generic.h`.
- Detected declarations: `struct palmas_pin_function`, `struct palmas_pctrl_chip_info`, `struct palmas_pins_pullup_dn_info`, `struct palmas_pins_od_info`, `struct palmas_pin_info`, `struct palmas_pingroup`, `struct palmas_pinctrl_data`, `enum palmas_pinmux`, `function palmas_pinctrl_get_pin_mux`, `function palmas_pinctrl_set_dvfs1`.
- 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.