#include <linux/mfd/mc13xxx.h>
#include <linux/platform_device.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/slab.h>
#include <linux/rtc.h>
#define DRIVER_NAME …
#define MC13XXX_RTCTOD …
#define MC13XXX_RTCTODA …
#define MC13XXX_RTCDAY …
#define MC13XXX_RTCDAYA …
#define SEC_PER_DAY …
struct mc13xxx_rtc { … };
static int mc13xxx_rtc_irq_enable_unlocked(struct device *dev,
unsigned int enabled, int irq)
{ … }
static int mc13xxx_rtc_alarm_irq_enable(struct device *dev,
unsigned int enabled)
{ … }
static int mc13xxx_rtc_read_time(struct device *dev, struct rtc_time *tm)
{ … }
static int mc13xxx_rtc_set_time(struct device *dev, struct rtc_time *tm)
{ … }
static int mc13xxx_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
{ … }
static int mc13xxx_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alarm)
{ … }
static irqreturn_t mc13xxx_rtc_alarm_handler(int irq, void *dev)
{ … }
static const struct rtc_class_ops mc13xxx_rtc_ops = …;
static irqreturn_t mc13xxx_rtc_reset_handler(int irq, void *dev)
{ … }
static int __init mc13xxx_rtc_probe(struct platform_device *pdev)
{ … }
static void mc13xxx_rtc_remove(struct platform_device *pdev)
{ … }
static const struct platform_device_id mc13xxx_rtc_idtable[] = …;
MODULE_DEVICE_TABLE(platform, mc13xxx_rtc_idtable);
static struct platform_driver mc13xxx_rtc_driver = …;
module_platform_driver_probe(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;