#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/device.h>
#include <linux/slab.h>
#include <linux/platform_device.h>
#include <linux/rtc.h>
#include <linux/bcd.h>
#include <linux/err.h>
#include <linux/mfd/pcf50633/core.h>
#define PCF50633_REG_RTCSC …
#define PCF50633_REG_RTCMN …
#define PCF50633_REG_RTCHR …
#define PCF50633_REG_RTCWD …
#define PCF50633_REG_RTCDT …
#define PCF50633_REG_RTCMT …
#define PCF50633_REG_RTCYR …
#define PCF50633_REG_RTCSCA …
#define PCF50633_REG_RTCMNA …
#define PCF50633_REG_RTCHRA …
#define PCF50633_REG_RTCWDA …
#define PCF50633_REG_RTCDTA …
#define PCF50633_REG_RTCMTA …
#define PCF50633_REG_RTCYRA …
enum pcf50633_time_indexes { … };
struct pcf50633_time { … };
struct pcf50633_rtc { … };
static void pcf2rtc_time(struct rtc_time *rtc, struct pcf50633_time *pcf)
{ … }
static void rtc2pcf_time(struct pcf50633_time *pcf, struct rtc_time *rtc)
{ … }
static int
pcf50633_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled)
{ … }
static int pcf50633_rtc_read_time(struct device *dev, struct rtc_time *tm)
{ … }
static int pcf50633_rtc_set_time(struct device *dev, struct rtc_time *tm)
{ … }
static int pcf50633_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{ … }
static int pcf50633_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{ … }
static const struct rtc_class_ops pcf50633_rtc_ops = …;
static void pcf50633_rtc_irq(int irq, void *data)
{ … }
static int pcf50633_rtc_probe(struct platform_device *pdev)
{ … }
static void pcf50633_rtc_remove(struct platform_device *pdev)
{ … }
static struct platform_driver pcf50633_rtc_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;