#include <linux/module.h>
#include <linux/rtc.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/bcd.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/of.h>
#define VT8500_RTC_TS …
#define VT8500_RTC_DS …
#define VT8500_RTC_AS …
#define VT8500_RTC_CR …
#define VT8500_RTC_TR …
#define VT8500_RTC_DR …
#define VT8500_RTC_WS …
#define VT8500_RTC_CL …
#define VT8500_RTC_IS …
#define VT8500_RTC_ST …
#define INVALID_TIME_BIT …
#define DATE_CENTURY_S …
#define DATE_YEAR_S …
#define DATE_YEAR_MASK …
#define DATE_MONTH_S …
#define DATE_MONTH_MASK …
#define DATE_DAY_MASK …
#define TIME_DOW_S …
#define TIME_DOW_MASK …
#define TIME_HOUR_S …
#define TIME_HOUR_MASK …
#define TIME_MIN_S …
#define TIME_MIN_MASK …
#define TIME_SEC_MASK …
#define ALARM_DAY_S …
#define ALARM_DAY_MASK …
#define ALARM_DAY_BIT …
#define ALARM_HOUR_BIT …
#define ALARM_MIN_BIT …
#define ALARM_SEC_BIT …
#define ALARM_ENABLE_MASK …
#define VT8500_RTC_CR_ENABLE …
#define VT8500_RTC_CR_12H …
#define VT8500_RTC_CR_SM_ENABLE …
#define VT8500_RTC_CR_SM_SEC …
#define VT8500_RTC_CR_CALIB …
#define VT8500_RTC_IS_ALARM …
struct vt8500_rtc { … };
static irqreturn_t vt8500_rtc_irq(int irq, void *dev_id)
{ … }
static int vt8500_rtc_read_time(struct device *dev, struct rtc_time *tm)
{ … }
static int vt8500_rtc_set_time(struct device *dev, struct rtc_time *tm)
{ … }
static int vt8500_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{ … }
static int vt8500_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{ … }
static int vt8500_alarm_irq_enable(struct device *dev, unsigned int enabled)
{ … }
static const struct rtc_class_ops vt8500_rtc_ops = …;
static int vt8500_rtc_probe(struct platform_device *pdev)
{ … }
static void vt8500_rtc_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id wmt_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, wmt_dt_ids);
static struct platform_driver vt8500_rtc_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;