#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/of.h>
#include <linux/io.h>
#include <linux/rtc.h>
#include <linux/clk.h>
#include <linux/bcd.h>
#include <linux/bitfield.h>
#include <linux/interrupt.h>
#include <linux/pm_wakeirq.h>
#define CDNS_RTC_CTLR …
#define CDNS_RTC_HMR …
#define CDNS_RTC_TIMR …
#define CDNS_RTC_CALR …
#define CDNS_RTC_TIMAR …
#define CDNS_RTC_CALAR …
#define CDNS_RTC_AENR …
#define CDNS_RTC_EFLR …
#define CDNS_RTC_IENR …
#define CDNS_RTC_IDISR …
#define CDNS_RTC_IMSKR …
#define CDNS_RTC_STSR …
#define CDNS_RTC_KRTCR …
#define CDNS_RTC_CTLR_TIME …
#define CDNS_RTC_CTLR_CAL …
#define CDNS_RTC_CTLR_TIME_CAL …
#define CDNS_RTC_STSR_VT …
#define CDNS_RTC_STSR_VC …
#define CDNS_RTC_STSR_VTA …
#define CDNS_RTC_STSR_VCA …
#define CDNS_RTC_STSR_VT_VC …
#define CDNS_RTC_STSR_VTA_VCA …
#define CDNS_RTC_KRTCR_KRTC …
#define CDNS_RTC_AEI_HOS …
#define CDNS_RTC_AEI_SEC …
#define CDNS_RTC_AEI_MIN …
#define CDNS_RTC_AEI_HOUR …
#define CDNS_RTC_AEI_DATE …
#define CDNS_RTC_AEI_MNTH …
#define CDNS_RTC_AEI_ALRM …
#define CDNS_RTC_TIME_H …
#define CDNS_RTC_TIME_S …
#define CDNS_RTC_TIME_M …
#define CDNS_RTC_TIME_HR …
#define CDNS_RTC_TIME_PM …
#define CDNS_RTC_TIME_CH …
#define CDNS_RTC_CAL_DAY …
#define CDNS_RTC_CAL_M …
#define CDNS_RTC_CAL_D …
#define CDNS_RTC_CAL_Y …
#define CDNS_RTC_CAL_C …
#define CDNS_RTC_CAL_CH …
#define CDNS_RTC_MAX_REGS_TRIES …
struct cdns_rtc { … };
static void cdns_rtc_set_enabled(struct cdns_rtc *crtc, bool enabled)
{ … }
static bool cdns_rtc_get_enabled(struct cdns_rtc *crtc)
{ … }
static irqreturn_t cdns_rtc_irq_handler(int irq, void *id)
{ … }
static u32 cdns_rtc_time2reg(struct rtc_time *tm)
{ … }
static void cdns_rtc_reg2time(u32 reg, struct rtc_time *tm)
{ … }
static int cdns_rtc_read_time(struct device *dev, struct rtc_time *tm)
{ … }
static int cdns_rtc_set_time(struct device *dev, struct rtc_time *tm)
{ … }
static int cdns_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled)
{ … }
static int cdns_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
{ … }
static int cdns_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alarm)
{ … }
static const struct rtc_class_ops cdns_rtc_ops = …;
static int cdns_rtc_probe(struct platform_device *pdev)
{ … }
static void cdns_rtc_remove(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM_SLEEP
static int cdns_rtc_suspend(struct device *dev)
{ … }
static int cdns_rtc_resume(struct device *dev)
{ … }
#endif
static SIMPLE_DEV_PM_OPS(cdns_rtc_pm_ops, cdns_rtc_suspend, cdns_rtc_resume);
static const struct of_device_id cdns_rtc_of_match[] = …;
MODULE_DEVICE_TABLE(of, cdns_rtc_of_match);
static struct platform_driver cdns_rtc_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;