drivers/misc/cardreader/rtsx_pcr.c
Source file repositories/reference/linux-study-clean/drivers/misc/cardreader/rtsx_pcr.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/misc/cardreader/rtsx_pcr.c- Extension
.c- Size
- 44504 bytes
- Lines
- 1836
- Domain
- Driver Families
- Bucket
- drivers/misc
- 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/pci.hlinux/module.hlinux/slab.hlinux/dma-mapping.hlinux/highmem.hlinux/interrupt.hlinux/delay.hlinux/idr.hlinux/platform_device.hlinux/mfd/core.hlinux/rtsx_pci.hlinux/mmc/card.hlinux/unaligned.hlinux/pm.hlinux/pm_runtime.hrtsx_pcr.hrts5261.hrts5228.hrts5264.h
Detected Declarations
function rtsx_comm_set_ltr_latencyfunction rtsx_set_ltr_latencyfunction rtsx_comm_set_aspmfunction rtsx_disable_aspmfunction rtsx_set_l1off_subfunction rtsx_set_l1off_sub_cfg_d0function rtsx_comm_pm_full_onfunction rtsx_pm_full_onfunction rtsx_pci_start_runfunction rtsx_pci_write_registerfunction rtsx_pci_read_registerfunction __rtsx_pci_write_phy_registerfunction rtsx_pci_write_phy_registerfunction __rtsx_pci_read_phy_registerfunction rtsx_pci_read_phy_registerfunction rtsx_pci_stop_cmdfunction rtsx_pci_add_cmdfunction rtsx_pci_send_cmd_no_waitfunction rtsx_pci_send_cmdfunction rtsx_pci_add_sg_tblfunction rtsx_pci_dma_map_sgfunction rtsx_pci_dma_unmap_sgfunction rtsx_pci_dma_transferfunction rtsx_pci_read_ppbuffunction rtsx_pci_write_ppbuffunction rtsx_pci_set_pull_ctlfunction rtsx_pci_card_pull_ctl_enablefunction rtsx_pci_card_pull_ctl_disablefunction rtsx_pci_enable_bus_intfunction double_ssc_depthfunction revise_ssc_depthfunction rtsx_pci_switch_clockfunction rtsx_pci_card_power_onfunction rtsx_pci_card_power_offfunction rtsx_pci_card_exclusive_checkfunction rtsx_pci_switch_output_voltagefunction rtsx_pci_card_existfunction rtsx_pci_complete_unfinished_transferfunction rtsx_pci_card_detectfunction rtsx_pci_process_ocpfunction rtsx_pci_process_ocp_interruptfunction rtsx_pci_isrfunction rtsx_pci_acquire_irqfunction rtsx_base_force_power_downfunction rtsx_pci_power_offfunction rtsx_pci_enable_ocpfunction rtsx_pci_disable_ocpfunction rtsx_pci_init_ocp
Annotated Snippet
static struct pci_driver rtsx_pci_driver = {
.name = DRV_NAME_RTSX_PCI,
.id_table = rtsx_pci_ids,
.probe = rtsx_pci_probe,
.remove = rtsx_pci_remove,
.driver.pm = &rtsx_pci_pm_ops,
.shutdown = rtsx_pci_shutdown,
};
module_pci_driver(rtsx_pci_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Wei WANG <wei_wang@realsil.com.cn>");
MODULE_DESCRIPTION("Realtek PCI-E Card Reader Driver");
Annotation
- Immediate include surface: `linux/pci.h`, `linux/module.h`, `linux/slab.h`, `linux/dma-mapping.h`, `linux/highmem.h`, `linux/interrupt.h`, `linux/delay.h`, `linux/idr.h`.
- Detected declarations: `function rtsx_comm_set_ltr_latency`, `function rtsx_set_ltr_latency`, `function rtsx_comm_set_aspm`, `function rtsx_disable_aspm`, `function rtsx_set_l1off_sub`, `function rtsx_set_l1off_sub_cfg_d0`, `function rtsx_comm_pm_full_on`, `function rtsx_pm_full_on`, `function rtsx_pci_start_run`, `function rtsx_pci_write_register`.
- Atlas domain: Driver Families / drivers/misc.
- 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.