#define pr_fmt(fmt) …
#include <linux/module.h>
#include <linux/of.h>
#include <linux/rtc.h>
#include <linux/kdev_t.h>
#include <linux/idr.h>
#include <linux/slab.h>
#include <linux/workqueue.h>
#include "rtc-core.h"
static DEFINE_IDA(rtc_ida);
static void rtc_device_release(struct device *dev)
{ … }
#ifdef CONFIG_RTC_HCTOSYS_DEVICE
int rtc_hctosys_ret = …;
static void rtc_hctosys(struct rtc_device *rtc)
{ … }
#endif
#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_RTC_HCTOSYS_DEVICE)
static struct timespec64 old_rtc, old_system, old_delta;
static int rtc_suspend(struct device *dev)
{ … }
static int rtc_resume(struct device *dev)
{ … }
static SIMPLE_DEV_PM_OPS(rtc_class_dev_pm_ops, rtc_suspend, rtc_resume);
#define RTC_CLASS_DEV_PM_OPS …
#else
#define RTC_CLASS_DEV_PM_OPS …
#endif
const struct class rtc_class = …;
static struct rtc_device *rtc_allocate_device(void)
{ … }
static int rtc_device_get_id(struct device *dev)
{ … }
static void rtc_device_get_offset(struct rtc_device *rtc)
{ … }
static void devm_rtc_unregister_device(void *data)
{ … }
static void devm_rtc_release_device(void *res)
{ … }
struct rtc_device *devm_rtc_allocate_device(struct device *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
int __devm_rtc_register_device(struct module *owner, struct rtc_device *rtc)
{ … }
EXPORT_SYMBOL_GPL(…);
struct rtc_device *devm_rtc_device_register(struct device *dev,
const char *name,
const struct rtc_class_ops *ops,
struct module *owner)
{ … }
EXPORT_SYMBOL_GPL(…);
static int __init rtc_init(void)
{ … }
subsys_initcall(rtc_init);