#include <linux/platform_device.h>
#include <linux/mc146818rtc.h>
#include <linux/export.h>
#include <linux/pnp.h>
#include <asm/vsyscall.h>
#include <asm/x86_init.h>
#include <asm/time.h>
#include <asm/setup.h>
#ifdef CONFIG_X86_32
volatile unsigned long cmos_lock;
EXPORT_SYMBOL(cmos_lock);
#endif
DEFINE_SPINLOCK(…);
EXPORT_SYMBOL(…);
int mach_set_cmos_time(const struct timespec64 *now)
{ … }
void mach_get_cmos_time(struct timespec64 *now)
{ … }
unsigned char rtc_cmos_read(unsigned char addr)
{ … }
EXPORT_SYMBOL(…);
void rtc_cmos_write(unsigned char val, unsigned char addr)
{ … }
EXPORT_SYMBOL(…);
int update_persistent_clock64(struct timespec64 now)
{ … }
void read_persistent_clock64(struct timespec64 *ts)
{ … }
static struct resource rtc_resources[] = …;
static struct platform_device rtc_device = …;
static __init int add_rtc_cmos(void)
{ … }
device_initcall(add_rtc_cmos);