drivers/memory/mtk-smi.c
Source file repositories/reference/linux-study-clean/drivers/memory/mtk-smi.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/memory/mtk-smi.c- Extension
.c- Size
- 33672 bytes
- Lines
- 992
- Domain
- Driver Families
- Bucket
- drivers/memory
- 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.
- 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/arm-smccc.hlinux/clk.hlinux/component.hlinux/device.hlinux/err.hlinux/io.hlinux/iopoll.hlinux/module.hlinux/of.hlinux/of_platform.hlinux/platform_device.hlinux/pm_runtime.hlinux/soc/mediatek/mtk_sip_svc.hsoc/mediatek/smi.hdt-bindings/memory/mt2701-larb-port.hdt-bindings/memory/mtk-memory-port.h
Detected Declarations
struct mtk_smi_reg_pairstruct mtk_smi_common_platstruct mtk_smi_larb_genstruct mtk_smistruct mtk_smi_larbenum mtk_smi_typefunction mtk_smi_larb_bindfunction mtk_smi_larb_unbindfunction mtk_smi_larb_config_port_gen1function mtk_smi_larb_config_port_mt8167function mtk_smi_larb_config_port_mt8173function mtk_smi_larb_config_port_gen2_generalfunction for_each_set_bitfunction mtk_smi_larb_sleep_ctrl_enablefunction mtk_smi_larb_sleep_ctrl_disablefunction mtk_smi_device_link_commonfunction mtk_smi_dts_clk_initfunction mtk_smi_larb_probefunction mtk_smi_larb_removefunction mtk_smi_larb_resumefunction mtk_smi_larb_suspendfunction mtk_smi_common_probefunction mtk_smi_common_removefunction mtk_smi_common_resumefunction mtk_smi_common_suspendfunction mtk_smi_initfunction mtk_smi_exitmodule init mtk_smi_init
Annotated Snippet
module_init(mtk_smi_init);
static void __exit mtk_smi_exit(void)
{
platform_unregister_drivers(smidrivers, ARRAY_SIZE(smidrivers));
}
module_exit(mtk_smi_exit);
MODULE_DESCRIPTION("MediaTek SMI driver");
MODULE_LICENSE("GPL v2");
Annotation
- Immediate include surface: `linux/arm-smccc.h`, `linux/clk.h`, `linux/component.h`, `linux/device.h`, `linux/err.h`, `linux/io.h`, `linux/iopoll.h`, `linux/module.h`.
- Detected declarations: `struct mtk_smi_reg_pair`, `struct mtk_smi_common_plat`, `struct mtk_smi_larb_gen`, `struct mtk_smi`, `struct mtk_smi_larb`, `enum mtk_smi_type`, `function mtk_smi_larb_bind`, `function mtk_smi_larb_unbind`, `function mtk_smi_larb_config_port_gen1`, `function mtk_smi_larb_config_port_mt8167`.
- Atlas domain: Driver Families / drivers/memory.
- Implementation status: integration 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.