drivers/rtc/rtc-pcf2127.c
Source file repositories/reference/linux-study-clean/drivers/rtc/rtc-pcf2127.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/rtc/rtc-pcf2127.c- Extension
.c- Size
- 42547 bytes
- Lines
- 1637
- 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.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- 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/i2c.hlinux/spi/spi.hlinux/bcd.hlinux/bitfield.hlinux/rtc.hlinux/slab.hlinux/module.hlinux/of.hlinux/of_irq.hlinux/of_device.hlinux/regmap.hlinux/watchdog.h
Detected Declarations
struct pcf21xx_ts_configstruct pcf21xx_configstruct pcf2127enum pcf21xx_typefunction pcf2127_rtc_read_timefunction pcf2127_rtc_set_timefunction pcf2127_param_getfunction pcf2127_param_setfunction pcf2127_rtc_ioctlfunction pcf2127_nvmem_readfunction pcf2127_nvmem_writefunction pcf2127_wdt_pingfunction pcf2127_wdt_active_pingfunction pcf2127_wdt_startfunction pcf2127_wdt_stopfunction pcf2127_wdt_set_timeoutfunction pcf2127_watchdog_get_periodfunction pcf2127_watchdog_initfunction pinfunction pcf2127_rtc_read_alarmfunction pcf2127_rtc_alarm_irq_enablefunction pcf2127_rtc_set_alarmfunction pcf2127_wdt_active_pingfunction pcf2127_rtc_ts_snapshotfunction pcf2127_rtc_irqfunction timestamp_storefunction timestamp0_storefunction timestamp1_storefunction timestamp2_storefunction timestamp3_storefunction timestamp_showfunction timestamp0_showfunction timestamp1_showfunction timestamp2_showfunction timestamp3_showfunction interruptfunction pcf2127_configure_interrupt_pinsfunction pcf2127_probefunction pcf2127_i2c_writefunction pcf2127_i2c_gather_writefunction pcf2127_i2c_readfunction pcf2127_i2c_probefunction pcf2127_i2c_register_driverfunction pcf2127_i2c_unregister_driverfunction pcf2127_i2c_register_driverfunction pcf2127_i2c_unregister_driverfunction pcf2127_spi_probefunction pcf2127_spi_register_driver
Annotated Snippet
module_init(pcf2127_init)
static void __exit pcf2127_exit(void)
{
pcf2127_spi_unregister_driver();
pcf2127_i2c_unregister_driver();
}
module_exit(pcf2127_exit)
MODULE_AUTHOR("Renaud Cerrato <r.cerrato@til-technologies.fr>");
MODULE_DESCRIPTION("NXP PCF2127/29/31 RTC driver");
MODULE_LICENSE("GPL v2");
Annotation
- Immediate include surface: `linux/i2c.h`, `linux/spi/spi.h`, `linux/bcd.h`, `linux/bitfield.h`, `linux/rtc.h`, `linux/slab.h`, `linux/module.h`, `linux/of.h`.
- Detected declarations: `struct pcf21xx_ts_config`, `struct pcf21xx_config`, `struct pcf2127`, `enum pcf21xx_type`, `function pcf2127_rtc_read_time`, `function pcf2127_rtc_set_time`, `function pcf2127_param_get`, `function pcf2127_param_set`, `function pcf2127_rtc_ioctl`, `function pcf2127_nvmem_read`.
- Atlas domain: Driver Families / drivers/rtc.
- Implementation status: integration implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
- 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.