#include <linux/clk.h>
#include <linux/interrupt.h>
#include <linux/ioctl.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/rtc.h>
#include <linux/slab.h>
#include <linux/suspend.h>
#include <linux/time.h>
#define AT91_RTT_MR …
#define AT91_RTT_RTPRES …
#define AT91_RTT_ALMIEN …
#define AT91_RTT_RTTINCIEN …
#define AT91_RTT_RTTRST …
#define AT91_RTT_AR …
#define AT91_RTT_ALMV …
#define AT91_RTT_VR …
#define AT91_RTT_CRTV …
#define AT91_RTT_SR …
#define AT91_RTT_ALMS …
#define AT91_RTT_RTTINC …
#define ALARM_DISABLED …
struct sam9_rtc { … };
#define rtt_readl(rtc, field) …
#define rtt_writel(rtc, field, val) …
static inline unsigned int gpbr_readl(struct sam9_rtc *rtc)
{ … }
static inline void gpbr_writel(struct sam9_rtc *rtc, unsigned int val)
{ … }
static int at91_rtc_readtime(struct device *dev, struct rtc_time *tm)
{ … }
static int at91_rtc_settime(struct device *dev, struct rtc_time *tm)
{ … }
static int at91_rtc_readalarm(struct device *dev, struct rtc_wkalrm *alrm)
{ … }
static int at91_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm)
{ … }
static int at91_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled)
{ … }
static int at91_rtc_proc(struct device *dev, struct seq_file *seq)
{ … }
static irqreturn_t at91_rtc_cache_events(struct sam9_rtc *rtc)
{ … }
static void at91_rtc_flush_events(struct sam9_rtc *rtc)
{ … }
static irqreturn_t at91_rtc_interrupt(int irq, void *_rtc)
{ … }
static const struct rtc_class_ops at91_rtc_ops = …;
static int at91_rtc_probe(struct platform_device *pdev)
{ … }
static void at91_rtc_remove(struct platform_device *pdev)
{ … }
static void at91_rtc_shutdown(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM_SLEEP
static int at91_rtc_suspend(struct device *dev)
{ … }
static int at91_rtc_resume(struct device *dev)
{ … }
#endif
static SIMPLE_DEV_PM_OPS(at91_rtc_pm_ops, at91_rtc_suspend, at91_rtc_resume);
static const struct of_device_id at91_rtc_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, at91_rtc_dt_ids);
static struct platform_driver at91_rtc_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;