drivers/mtd/devices/phram.c
Source file repositories/reference/linux-study-clean/drivers/mtd/devices/phram.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/mtd/devices/phram.c- Extension
.c- Size
- 9227 bytes
- Lines
- 446
- Domain
- Driver Families
- Bucket
- drivers/mtd
- 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/io.hlinux/init.hlinux/kernel.hlinux/list.hlinux/module.hlinux/moduleparam.hlinux/slab.hlinux/mtd/mtd.hasm/div64.hlinux/platform_device.hlinux/of_address.hlinux/of.hlinux/security.h
Detected Declarations
struct phram_mtd_listfunction phram_erasefunction phram_pointfunction phram_unpointfunction phram_readfunction phram_writefunction phram_mapfunction phram_unmapfunction unregister_devicesfunction list_for_each_entry_safefunction register_devicefunction parse_num64function parse_namefunction kill_final_newlinefunction phram_setupfunction phram_param_callfunction phram_probefunction phram_removefunction init_phramfunction cleanup_phrammodule init init_phram
Annotated Snippet
module_init(init_phram);
module_exit(cleanup_phram);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Joern Engel <joern@wh.fh-wedel.de>");
MODULE_DESCRIPTION("MTD driver for physical RAM");
Annotation
- Immediate include surface: `linux/io.h`, `linux/init.h`, `linux/kernel.h`, `linux/list.h`, `linux/module.h`, `linux/moduleparam.h`, `linux/slab.h`, `linux/mtd/mtd.h`.
- Detected declarations: `struct phram_mtd_list`, `function phram_erase`, `function phram_point`, `function phram_unpoint`, `function phram_read`, `function phram_write`, `function phram_map`, `function phram_unmap`, `function unregister_devices`, `function list_for_each_entry_safe`.
- Atlas domain: Driver Families / drivers/mtd.
- 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.