The following image shows the block diagram of the RTC driver. Figure 1. Block Diagram
Besides the general user space layer, the following layers are specific to the RTC
module.
RTC subsystem: The RTC driver framework provided by the
Linux kernel.
rtc-core: Provide API for RTC drivers to register
the RTC devices and drivers.
interface: Provide interface to interact with the
RTC devices (by calling ops functions). So
ioctrl/proc/sysfs can either be used to set or
read RTC time and alarm using API interface.
StarFive RTC driver: Define all underlying operation
(read/write register) and register RTC devices to rtc-core.