drivers/rtc/rtc-cmos.c
Source file repositories/reference/linux-study-clean/drivers/rtc/rtc-cmos.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/rtc/rtc-cmos.c- Extension
.c- Size
- 37511 bytes
- Lines
- 1512
- Domain
- Driver Families
- Bucket
- drivers/rtc
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/acpi.hlinux/kernel.hlinux/module.hlinux/init.hlinux/interrupt.hlinux/spinlock.hlinux/platform_device.hlinux/log2.hlinux/pm.hlinux/of.hlinux/of_platform.hasm/i8259.hasm/processor.hlinux/dmi.hlinux/mc146818rtc.hasm/hpet.h
Detected Declarations
struct cmos_rtcstruct cmos_read_alarm_callback_paramstruct cmos_set_alarm_callback_paramfunction cmos_use_acpi_alarmfunction cmos_use_acpi_alarmfunction is_intrfunction otherfunction hpet_mask_rtc_irq_bitfunction hpet_set_rtc_irq_bitfunction hpet_set_alarm_timefunction hpet_set_periodic_freqfunction hpet_rtc_timer_initfunction hpet_register_irq_handlerfunction hpet_unregister_irq_handlerfunction use_hpet_alarmfunction cmos_read_bank2function cmos_write_bank2function cmos_read_bank2function cmos_write_bank2function cmos_read_timefunction cmos_set_timefunction cmos_read_alarm_callbackfunction cmos_read_alarmfunction cmos_checkintrfunction cmos_irq_enablefunction cmos_irq_disablefunction cmos_validate_alarmfunction cmos_set_alarm_callbackfunction cmos_set_alarmfunction cmos_alarm_irq_enablefunction cmos_procfsfunction cmos_nvram_readfunction cmos_nvram_writefunction cmos_interruptfunction rtc_handlerfunction acpi_rtc_event_setupfunction acpi_rtc_event_cleanupfunction rtc_wake_onfunction rtc_wake_offfunction use_acpi_alarm_quirksfunction use_acpi_alarm_quirksfunction cmos_check_acpi_rtc_statusfunction acpi_rtc_event_setupfunction cmos_do_shutdownfunction cmos_do_removefunction cmos_aie_powerofffunction cmos_suspendfunction cmos_poweroff
Annotated Snippet
module_init(cmos_init);
static void __exit cmos_exit(void)
{
if (platform_driver_registered)
platform_driver_unregister(&cmos_platform_driver);
}
module_exit(cmos_exit);
MODULE_AUTHOR("David Brownell");
MODULE_DESCRIPTION("Driver for PC-style 'CMOS' RTCs");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/kernel.h`, `linux/module.h`, `linux/init.h`, `linux/interrupt.h`, `linux/spinlock.h`, `linux/platform_device.h`, `linux/log2.h`.
- Detected declarations: `struct cmos_rtc`, `struct cmos_read_alarm_callback_param`, `struct cmos_set_alarm_callback_param`, `function cmos_use_acpi_alarm`, `function cmos_use_acpi_alarm`, `function is_intr`, `function other`, `function hpet_mask_rtc_irq_bit`, `function hpet_set_rtc_irq_bit`, `function hpet_set_alarm_time`.
- Atlas domain: Driver Families / drivers/rtc.
- Implementation status: integration 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.