drivers/pinctrl/bcm/pinctrl-brcmstb-bcm2712.c
Source file repositories/reference/linux-study-clean/drivers/pinctrl/bcm/pinctrl-brcmstb-bcm2712.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/pinctrl/bcm/pinctrl-brcmstb-bcm2712.c- Extension
.c- Size
- 24809 bytes
- Lines
- 748
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/pinctrl/pinctrl.hlinux/of.hpinctrl-brcmstb.h
Detected Declarations
enum bcm2712_funcsfunction unitsfunction bcm2712_pinctrl_probe
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0+
/*
* Driver for Broadcom brcmstb GPIO units (pinctrl only)
*
* Copyright (C) 2024-2025 Ivan T. Ivanov, Andrea della Porta
* Copyright (C) 2021-3 Raspberry Pi Ltd.
* Copyright (C) 2012 Chris Boot, Simon Arlott, Stephen Warren
*
* Based heavily on the BCM2835 GPIO & pinctrl driver, which was inspired by:
* pinctrl-nomadik.c, please see original file for copyright information
* pinctrl-tegra.c, please see original file for copyright information
*/
#include <linux/pinctrl/pinctrl.h>
#include <linux/of.h>
#include "pinctrl-brcmstb.h"
#define BRCMSTB_FSEL_COUNT 8
#define BRCMSTB_FSEL_MASK 0xf
#define BRCMSTB_PIN(i, f1, f2, f3, f4, f5, f6, f7, f8) \
[i] = { \
.funcs = (u8[]) { \
func_##f1, \
func_##f2, \
func_##f3, \
func_##f4, \
func_##f5, \
func_##f6, \
func_##f7, \
func_##f8, \
}, \
.n_funcs = BRCMSTB_FSEL_COUNT, \
.func_mask = BRCMSTB_FSEL_MASK, \
}
enum bcm2712_funcs {
func_gpio,
func_alt1,
func_alt2,
func_alt3,
func_alt4,
func_alt5,
func_alt6,
func_alt7,
func_alt8,
func_aon_cpu_standbyb,
func_aon_fp_4sec_resetb,
func_aon_gpclk,
func_aon_pwm,
func_arm_jtag,
func_aud_fs_clk0,
func_avs_pmu_bsc,
func_bsc_m0,
func_bsc_m1,
func_bsc_m2,
func_bsc_m3,
func_clk_observe,
func_ctl_hdmi_5v,
func_enet0,
func_enet0_mii,
func_enet0_rgmii,
func_ext_sc_clk,
func_fl0,
func_fl1,
func_gpclk0,
func_gpclk1,
func_gpclk2,
func_hdmi_tx0_auto_i2c,
func_hdmi_tx0_bsc,
func_hdmi_tx1_auto_i2c,
func_hdmi_tx1_bsc,
func_i2s_in,
func_i2s_out,
func_ir_in,
func_mtsif,
func_mtsif_alt,
func_mtsif_alt1,
func_pdm,
func_pkt,
func_pm_led_out,
func_sc0,
func_sd0,
func_sd2,
func_sd_card_a,
func_sd_card_b,
func_sd_card_c,
func_sd_card_d,
func_sd_card_e,
func_sd_card_f,
Annotation
- Immediate include surface: `linux/pinctrl/pinctrl.h`, `linux/of.h`, `pinctrl-brcmstb.h`.
- Detected declarations: `enum bcm2712_funcs`, `function units`, `function bcm2712_pinctrl_probe`.
- 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.