#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>
#include <linux/rtc.h>
#define REG_RTC_CTRL …
#define REG_RTC_FREQ_CW_L …
#define REG_RTC_FREQ_CW_H …
#define REG_RTC_LOAD_VAL_L …
#define REG_RTC_LOAD_VAL_H …
#define REG_RTC_MATCH_VAL_L …
#define REG_RTC_MATCH_VAL_H …
#define REG_RTC_STATUS_INT …
#define REG_RTC_CNT_VAL_L …
#define REG_RTC_CNT_VAL_H …
#define SOFT_RSTZ_BIT …
#define CNT_EN_BIT …
#define WRAP_EN_BIT …
#define LOAD_EN_BIT …
#define READ_EN_BIT …
#define INT_MASK_BIT …
#define INT_FORCE_BIT …
#define INT_CLEAR_BIT …
#define RAW_INT_BIT …
#define ALM_INT_BIT …
struct msc313_rtc { … };
static int msc313_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
{ … }
static int msc313_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled)
{ … }
static int msc313_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alarm)
{ … }
static bool msc313_rtc_get_enabled(struct msc313_rtc *priv)
{ … }
static void msc313_rtc_set_enabled(struct msc313_rtc *priv)
{ … }
static int msc313_rtc_read_time(struct device *dev, struct rtc_time *tm)
{ … }
static int msc313_rtc_set_time(struct device *dev, struct rtc_time *tm)
{ … }
static const struct rtc_class_ops msc313_rtc_ops = …;
static irqreturn_t msc313_rtc_interrupt(s32 irq, void *dev_id)
{ … }
static int msc313_rtc_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id msc313_rtc_of_match_table[] = …;
MODULE_DEVICE_TABLE(of, msc313_rtc_of_match_table);
static struct platform_driver msc313_rtc_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;