drivers/mtd/maps/physmap-core.c
Source file repositories/reference/linux-study-clean/drivers/mtd/maps/physmap-core.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/mtd/maps/physmap-core.c- Extension
.c- Size
- 16695 bytes
- Lines
- 687
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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/module.hlinux/types.hlinux/kernel.hlinux/init.hlinux/slab.hlinux/device.hlinux/platform_device.hlinux/property.hlinux/mtd/mtd.hlinux/mtd/map.hlinux/mtd/partitions.hlinux/mtd/physmap.hlinux/mtd/concat.hlinux/mtd/cfi_endian.hlinux/io.hlinux/of.hlinux/pm_runtime.hlinux/gpio/consumer.hphysmap-gemini.hphysmap-ixp4xx.hphysmap-versatile.h
Detected Declarations
struct physmap_flash_infofunction physmap_flash_removefunction physmap_set_vppfunction physmap_set_addr_gpiosfunction physmap_addr_gpios_readfunction physmap_addr_gpios_copy_fromfunction physmap_addr_gpios_writefunction physmap_addr_gpios_copy_tofunction physmap_addr_gpios_map_initfunction physmap_addr_gpios_map_initfunction physmap_flash_of_initfunction physmap_flash_of_initfunction physmap_flash_pdata_initfunction physmap_flash_probefunction physmap_flash_shutdownfunction physmap_initfunction physmap_exitmodule init physmap_init
Annotated Snippet
module_init(physmap_init);
module_exit(physmap_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
MODULE_AUTHOR("Vitaly Wool <vwool@ru.mvista.com>");
MODULE_AUTHOR("Mike Frysinger <vapier@gentoo.org>");
MODULE_DESCRIPTION("Generic configurable MTD map driver");
/* legacy platform drivers can't hotplug or coldplg */
#ifndef CONFIG_MTD_PHYSMAP_COMPAT
/* work with hotplug and coldplug */
MODULE_ALIAS("platform:physmap-flash");
#endif
Annotation
- Immediate include surface: `linux/module.h`, `linux/types.h`, `linux/kernel.h`, `linux/init.h`, `linux/slab.h`, `linux/device.h`, `linux/platform_device.h`, `linux/property.h`.
- Detected declarations: `struct physmap_flash_info`, `function physmap_flash_remove`, `function physmap_set_vpp`, `function physmap_set_addr_gpios`, `function physmap_addr_gpios_read`, `function physmap_addr_gpios_copy_from`, `function physmap_addr_gpios_write`, `function physmap_addr_gpios_copy_to`, `function physmap_addr_gpios_map_init`, `function physmap_addr_gpios_map_init`.
- Atlas domain: Driver Families / drivers/mtd.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.