drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c- Extension
.c- Size
- 3948 bytes
- Lines
- 158
- Domain
- Driver Families
- Bucket
- drivers/net
- 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/init.hlinux/of.hlinux/of_irq.hlinux/of_net.hlinux/clk.hdefs.hdebug.hcore.hcommon.hof.h
Detected Declarations
function Copyrightfunction brcmf_of_probe
Annotated Snippet
if (!board_type) {
of_node_put(root);
return 0;
}
strreplace(board_type, '/', '-');
settings->board_type = board_type;
}
of_node_put(root);
clk = devm_clk_get_optional_enabled_with_rate(dev, "lpo", 32768);
if (IS_ERR(clk))
return PTR_ERR(clk);
brcmf_dbg(INFO, "%s LPO clock\n", clk ? "enable" : "no");
if (!np || !of_device_is_compatible(np, "brcm,bcm4329-fmac"))
return 0;
err = brcmf_of_get_country_codes(dev, settings);
if (err)
brcmf_err("failed to get OF country code map (err=%d)\n", err);
err = of_get_mac_address(np, settings->mac);
if (err == -EPROBE_DEFER)
return err;
if (bus_type != BRCMF_BUSTYPE_SDIO)
return 0;
if (of_property_read_u32(np, "brcm,drive-strength", &val) == 0)
sdio->drive_strength = val;
/* make sure there are interrupts defined in the node */
if (of_irq_parse_one(np, 0, &oirq))
return 0;
irq = irq_create_of_mapping(&oirq);
if (!irq) {
brcmf_err("interrupt could not be mapped\n");
return 0;
}
irqf = irq_get_trigger_type(irq);
sdio->oob_irq_supported = true;
sdio->oob_irq_nr = irq;
sdio->oob_irq_flags = irqf;
return 0;
}
Annotation
- Immediate include surface: `linux/init.h`, `linux/of.h`, `linux/of_irq.h`, `linux/of_net.h`, `linux/clk.h`, `defs.h`, `debug.h`, `core.h`.
- Detected declarations: `function Copyright`, `function brcmf_of_probe`.
- Atlas domain: Driver Families / drivers/net.
- 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.