drivers/pinctrl/pinctrl-bm1880.c
Source file repositories/reference/linux-study-clean/drivers/pinctrl/pinctrl-bm1880.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/pinctrl/pinctrl-bm1880.c- Extension
.c- Size
- 45173 bytes
- Lines
- 1360
- 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/io.hlinux/of.hlinux/platform_device.hlinux/slab.hlinux/pinctrl/pinconf-generic.hlinux/pinctrl/pinconf.hlinux/pinctrl/pinctrl.hlinux/pinctrl/pinmux.hcore.hpinctrl-utils.h
Detected Declarations
struct bm1880_pinctrlstruct bm1880_pctrl_groupstruct bm1880_pinmux_functionstruct bm1880_pinconf_dataenum bm1880_pinmux_functionsfunction bm1880_pctrl_get_groups_countfunction bm1880_pctrl_get_group_pinsfunction bm1880_pmux_get_functions_countfunction bm1880_pmux_get_function_groupsfunction bm1880_pinmux_set_muxfunction bm1880_pinconf_drv_setfunction bm1880_pinconf_drv_getfunction bm1880_pinconf_cfg_getfunction bm1880_pinconf_cfg_setfunction bm1880_pinconf_group_setfunction bm1880_pinctrl_probefunction bm1880_pinctrl_init
Annotated Snippet
struct bm1880_pinctrl {
void __iomem *base;
struct pinctrl_dev *pctrldev;
const struct bm1880_pctrl_group *groups;
unsigned int ngroups;
const struct bm1880_pinmux_function *funcs;
unsigned int nfuncs;
const struct bm1880_pinconf_data *pinconf;
};
/**
* struct bm1880_pctrl_group - pinctrl group
* @name: Name of the group
* @pins: Array of pins belonging to this group
* @npins: Number of @pins
*/
struct bm1880_pctrl_group {
const char *name;
const unsigned int *pins;
const unsigned int npins;
};
/**
* struct bm1880_pinmux_function - a pinmux function
* @name: Name of the pinmux function.
* @groups: List of pingroups for this function.
* @ngroups: Number of entries in @groups.
* @mux_val: Selector for this function
* @mux: Offset of function specific mux
* @mux_shift: Shift for function specific selector
*/
struct bm1880_pinmux_function {
const char *name;
const char * const *groups;
unsigned int ngroups;
u32 mux_val;
u32 mux;
u8 mux_shift;
};
/**
* struct bm1880_pinconf_data - pinconf data
* @drv_bits: Drive strength bit width
*/
struct bm1880_pinconf_data {
u32 drv_bits;
};
static const struct pinctrl_pin_desc bm1880_pins[] = {
PINCTRL_PIN(0, "MIO0"),
PINCTRL_PIN(1, "MIO1"),
PINCTRL_PIN(2, "MIO2"),
PINCTRL_PIN(3, "MIO3"),
PINCTRL_PIN(4, "MIO4"),
PINCTRL_PIN(5, "MIO5"),
PINCTRL_PIN(6, "MIO6"),
PINCTRL_PIN(7, "MIO7"),
PINCTRL_PIN(8, "MIO8"),
PINCTRL_PIN(9, "MIO9"),
PINCTRL_PIN(10, "MIO10"),
PINCTRL_PIN(11, "MIO11"),
PINCTRL_PIN(12, "MIO12"),
PINCTRL_PIN(13, "MIO13"),
PINCTRL_PIN(14, "MIO14"),
PINCTRL_PIN(15, "MIO15"),
PINCTRL_PIN(16, "MIO16"),
PINCTRL_PIN(17, "MIO17"),
PINCTRL_PIN(18, "MIO18"),
PINCTRL_PIN(19, "MIO19"),
PINCTRL_PIN(20, "MIO20"),
PINCTRL_PIN(21, "MIO21"),
PINCTRL_PIN(22, "MIO22"),
PINCTRL_PIN(23, "MIO23"),
PINCTRL_PIN(24, "MIO24"),
PINCTRL_PIN(25, "MIO25"),
PINCTRL_PIN(26, "MIO26"),
PINCTRL_PIN(27, "MIO27"),
PINCTRL_PIN(28, "MIO28"),
PINCTRL_PIN(29, "MIO29"),
PINCTRL_PIN(30, "MIO30"),
PINCTRL_PIN(31, "MIO31"),
PINCTRL_PIN(32, "MIO32"),
PINCTRL_PIN(33, "MIO33"),
PINCTRL_PIN(34, "MIO34"),
PINCTRL_PIN(35, "MIO35"),
PINCTRL_PIN(36, "MIO36"),
PINCTRL_PIN(37, "MIO37"),
PINCTRL_PIN(38, "MIO38"),
PINCTRL_PIN(39, "MIO39"),
PINCTRL_PIN(40, "MIO40"),
Annotation
- Immediate include surface: `linux/io.h`, `linux/of.h`, `linux/platform_device.h`, `linux/slab.h`, `linux/pinctrl/pinconf-generic.h`, `linux/pinctrl/pinconf.h`, `linux/pinctrl/pinctrl.h`, `linux/pinctrl/pinmux.h`.
- Detected declarations: `struct bm1880_pinctrl`, `struct bm1880_pctrl_group`, `struct bm1880_pinmux_function`, `struct bm1880_pinconf_data`, `enum bm1880_pinmux_functions`, `function bm1880_pctrl_get_groups_count`, `function bm1880_pctrl_get_group_pins`, `function bm1880_pmux_get_functions_count`, `function bm1880_pmux_get_function_groups`, `function bm1880_pinmux_set_mux`.
- 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.