drivers/mailbox/hi6220-mailbox.c
Source file repositories/reference/linux-study-clean/drivers/mailbox/hi6220-mailbox.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/mailbox/hi6220-mailbox.c- Extension
.c- Size
- 9033 bytes
- Lines
- 368
- Domain
- Driver Families
- Bucket
- drivers/mailbox
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- 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/device.hlinux/err.hlinux/interrupt.hlinux/io.hlinux/kfifo.hlinux/mailbox_controller.hlinux/module.hlinux/of.hlinux/platform_device.hlinux/slab.h
Detected Declarations
struct hi6220_mbox_chanstruct hi6220_mboxfunction mbox_set_statefunction mbox_set_modefunction hi6220_mbox_last_tx_donefunction hi6220_mbox_send_datafunction hi6220_mbox_interruptfunction hi6220_mbox_startupfunction hi6220_mbox_shutdownfunction hi6220_mbox_probefunction hi6220_mbox_initfunction hi6220_mbox_exitmodule init hi6220_mbox_init
Annotated Snippet
core_initcall(hi6220_mbox_init);
static void __exit hi6220_mbox_exit(void)
{
platform_driver_unregister(&hi6220_mbox_driver);
}
module_exit(hi6220_mbox_exit);
MODULE_AUTHOR("Leo Yan <leo.yan@linaro.org>");
MODULE_DESCRIPTION("Hi6220 mailbox driver");
MODULE_LICENSE("GPL v2");
Annotation
- Immediate include surface: `linux/device.h`, `linux/err.h`, `linux/interrupt.h`, `linux/io.h`, `linux/kfifo.h`, `linux/mailbox_controller.h`, `linux/module.h`, `linux/of.h`.
- Detected declarations: `struct hi6220_mbox_chan`, `struct hi6220_mbox`, `function mbox_set_state`, `function mbox_set_mode`, `function hi6220_mbox_last_tx_done`, `function hi6220_mbox_send_data`, `function hi6220_mbox_interrupt`, `function hi6220_mbox_startup`, `function hi6220_mbox_shutdown`, `function hi6220_mbox_probe`.
- Atlas domain: Driver Families / drivers/mailbox.
- Implementation status: integration implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.