#include <linux/bcd.h>
#include <linux/completion.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/ioctl.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mfd/as3722.h>
#include <linux/platform_device.h>
#include <linux/rtc.h>
#include <linux/time.h>
#define AS3722_RTC_START_YEAR …
struct as3722_rtc { … };
static void as3722_time_to_reg(u8 *rbuff, struct rtc_time *tm)
{ … }
static void as3722_reg_to_time(u8 *rbuff, struct rtc_time *tm)
{ … }
static int as3722_rtc_read_time(struct device *dev, struct rtc_time *tm)
{ … }
static int as3722_rtc_set_time(struct device *dev, struct rtc_time *tm)
{ … }
static int as3722_rtc_alarm_irq_enable(struct device *dev,
unsigned int enabled)
{ … }
static int as3722_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{ … }
static int as3722_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{ … }
static irqreturn_t as3722_alarm_irq(int irq, void *data)
{ … }
static const struct rtc_class_ops as3722_rtc_ops = …;
static int as3722_rtc_probe(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM_SLEEP
static int as3722_rtc_suspend(struct device *dev)
{ … }
static int as3722_rtc_resume(struct device *dev)
{ … }
#endif
static SIMPLE_DEV_PM_OPS(as3722_rtc_pm_ops, as3722_rtc_suspend,
as3722_rtc_resume);
static struct platform_driver as3722_rtc_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_ALIAS(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;