drivers/mtd/nand/raw/r852.c
Source file repositories/reference/linux-study-clean/drivers/mtd/nand/raw/r852.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/mtd/nand/raw/r852.c- Extension
.c- Size
- 25592 bytes
- Lines
- 1095
- Domain
- Driver Families
- Bucket
- drivers/mtd
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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/kernel.hlinux/module.hlinux/jiffies.hlinux/workqueue.hlinux/interrupt.hlinux/pci.hlinux/pci_ids.hlinux/delay.hlinux/slab.hasm/byteorder.hlinux/sched.hsm_common.hr852.h
Detected Declarations
function r852_read_regfunction r852_write_regfunction r852_read_reg_dwordfunction r852_write_reg_dwordfunction r852_dma_testfunction r852_dma_enablefunction r852_dma_donefunction r852_dma_waitfunction r852_do_dmafunction r852_write_buffunction r852_read_buffunction r852_read_bytefunction r852_cmdctlfunction r852_waitfunction r852_readyfunction r852_ecc_hwctlfunction r852_ecc_calculatefunction r852_ecc_correctfunction r852_read_oobfunction r852_engine_enablefunction r852_engine_disablefunction r852_card_update_presentfunction r852_update_card_detectfunction media_type_showfunction r852_update_media_statusfunction r852_register_nand_devicefunction r852_unregister_nand_devicefunction r852_card_detect_workfunction r852_disable_irqsfunction r852_irqfunction r852_attach_chipfunction r852_probefunction r852_removefunction r852_shutdownfunction r852_suspendfunction r852_resume
Annotated Snippet
static struct pci_driver r852_pci_driver = {
.name = DRV_NAME,
.id_table = r852_pci_id_tbl,
.probe = r852_probe,
.remove = r852_remove,
.shutdown = r852_shutdown,
.driver.pm = &r852_pm_ops,
};
module_pci_driver(r852_pci_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Maxim Levitsky <maximlevitsky@gmail.com>");
MODULE_DESCRIPTION("Ricoh 85xx xD/smartmedia card reader driver");
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/jiffies.h`, `linux/workqueue.h`, `linux/interrupt.h`, `linux/pci.h`, `linux/pci_ids.h`, `linux/delay.h`.
- Detected declarations: `function r852_read_reg`, `function r852_write_reg`, `function r852_read_reg_dword`, `function r852_write_reg_dword`, `function r852_dma_test`, `function r852_dma_enable`, `function r852_dma_done`, `function r852_dma_wait`, `function r852_do_dma`, `function r852_write_buf`.
- Atlas domain: Driver Families / drivers/mtd.
- Implementation status: pattern implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- 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.