drivers/pinctrl/pinctrl-max77620.c
Source file repositories/reference/linux-study-clean/drivers/pinctrl/pinctrl-max77620.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/pinctrl/pinctrl-max77620.c- Extension
.c- Size
- 18185 bytes
- Lines
- 669
- 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/mfd/max77620.hlinux/mod_devicetable.hlinux/module.hlinux/platform_device.hlinux/property.hlinux/regmap.hlinux/pinctrl/pinctrl.hlinux/pinctrl/pinconf-generic.hlinux/pinctrl/pinconf.hlinux/pinctrl/pinmux.hcore.hpinconf.hpinctrl-utils.h
Detected Declarations
struct max77620_pin_functionstruct max77620_pingroupstruct max77620_pin_infostruct max77620_fps_configstruct max77620_pctrl_infoenum max77620_pin_ppdrvenum max77620_alternate_pinmux_optionfunction max77620_pinctrl_get_groups_countfunction max77620_pinctrl_get_group_pinsfunction max77620_pinctrl_get_funcs_countfunction max77620_pinctrl_get_func_groupsfunction max77620_pinctrl_enablefunction max77620_pinconf_getfunction max77620_get_default_fpsfunction max77620_set_fps_paramfunction max77620_pinconf_setfunction max77620_pinctrl_probefunction max77620_pinctrl_suspendfunction max77620_pinctrl_resume
Annotated Snippet
struct max77620_pin_function {
const char *name;
const char * const *groups;
unsigned int ngroups;
int mux_option;
};
static const struct pinconf_generic_params max77620_cfg_params[] = {
{
.property = "maxim,active-fps-source",
.param = MAX77620_ACTIVE_FPS_SOURCE,
}, {
.property = "maxim,active-fps-power-up-slot",
.param = MAX77620_ACTIVE_FPS_POWER_ON_SLOTS,
}, {
.property = "maxim,active-fps-power-down-slot",
.param = MAX77620_ACTIVE_FPS_POWER_DOWN_SLOTS,
}, {
.property = "maxim,suspend-fps-source",
.param = MAX77620_SUSPEND_FPS_SOURCE,
}, {
.property = "maxim,suspend-fps-power-up-slot",
.param = MAX77620_SUSPEND_FPS_POWER_ON_SLOTS,
}, {
.property = "maxim,suspend-fps-power-down-slot",
.param = MAX77620_SUSPEND_FPS_POWER_DOWN_SLOTS,
},
};
enum max77620_alternate_pinmux_option {
MAX77620_PINMUX_GPIO = 0,
MAX77620_PINMUX_LOW_POWER_MODE_CONTROL_IN = 1,
MAX77620_PINMUX_FLEXIBLE_POWER_SEQUENCER_OUT = 2,
MAX77620_PINMUX_32K_OUT1 = 3,
MAX77620_PINMUX_SD0_DYNAMIC_VOLTAGE_SCALING_IN = 4,
MAX77620_PINMUX_SD1_DYNAMIC_VOLTAGE_SCALING_IN = 5,
MAX77620_PINMUX_REFERENCE_OUT = 6,
};
struct max77620_pingroup {
const char *name;
const unsigned int pins[1];
unsigned int npins;
enum max77620_alternate_pinmux_option alt_option;
};
struct max77620_pin_info {
enum max77620_pin_ppdrv drv_type;
};
struct max77620_fps_config {
int active_fps_src;
int active_power_up_slots;
int active_power_down_slots;
int suspend_fps_src;
int suspend_power_up_slots;
int suspend_power_down_slots;
};
struct max77620_pctrl_info {
struct device *dev;
struct pinctrl_dev *pctl;
struct regmap *rmap;
const struct max77620_pin_function *functions;
unsigned int num_functions;
const struct max77620_pingroup *pin_groups;
int num_pin_groups;
const struct pinctrl_pin_desc *pins;
unsigned int num_pins;
struct max77620_pin_info pin_info[MAX77620_PIN_NUM];
struct max77620_fps_config fps_config[MAX77620_PIN_NUM];
};
static const struct pinctrl_pin_desc max77620_pins_desc[] = {
PINCTRL_PIN(MAX77620_GPIO0, "gpio0"),
PINCTRL_PIN(MAX77620_GPIO1, "gpio1"),
PINCTRL_PIN(MAX77620_GPIO2, "gpio2"),
PINCTRL_PIN(MAX77620_GPIO3, "gpio3"),
PINCTRL_PIN(MAX77620_GPIO4, "gpio4"),
PINCTRL_PIN(MAX77620_GPIO5, "gpio5"),
PINCTRL_PIN(MAX77620_GPIO6, "gpio6"),
PINCTRL_PIN(MAX77620_GPIO7, "gpio7"),
};
static const char * const gpio_groups[] = {
"gpio0",
"gpio1",
"gpio2",
"gpio3",
"gpio4",
Annotation
- Immediate include surface: `linux/mfd/max77620.h`, `linux/mod_devicetable.h`, `linux/module.h`, `linux/platform_device.h`, `linux/property.h`, `linux/regmap.h`, `linux/pinctrl/pinctrl.h`, `linux/pinctrl/pinconf-generic.h`.
- Detected declarations: `struct max77620_pin_function`, `struct max77620_pingroup`, `struct max77620_pin_info`, `struct max77620_fps_config`, `struct max77620_pctrl_info`, `enum max77620_pin_ppdrv`, `enum max77620_alternate_pinmux_option`, `function max77620_pinctrl_get_groups_count`, `function max77620_pinctrl_get_group_pins`, `function max77620_pinctrl_get_funcs_count`.
- 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.