#include <linux/bcd.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/mfd/palmas.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/rtc.h>
#include <linux/types.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
struct palmas_rtc { … };
#define PALMAS_NUM_TIME_REGS …
static int palmas_rtc_read_time(struct device *dev, struct rtc_time *tm)
{ … }
static int palmas_rtc_set_time(struct device *dev, struct rtc_time *tm)
{ … }
static int palmas_rtc_alarm_irq_enable(struct device *dev, unsigned enabled)
{ … }
static int palmas_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm)
{ … }
static int palmas_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm)
{ … }
static int palmas_clear_interrupts(struct device *dev)
{ … }
static irqreturn_t palmas_rtc_interrupt(int irq, void *context)
{ … }
static const struct rtc_class_ops palmas_rtc_ops = …;
static int palmas_rtc_probe(struct platform_device *pdev)
{ … }
static void palmas_rtc_remove(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM_SLEEP
static int palmas_rtc_suspend(struct device *dev)
{ … }
static int palmas_rtc_resume(struct device *dev)
{ … }
#endif
static SIMPLE_DEV_PM_OPS(palmas_rtc_pm_ops, palmas_rtc_suspend,
palmas_rtc_resume);
#ifdef CONFIG_OF
static const struct of_device_id of_palmas_rtc_match[] = …;
MODULE_DEVICE_TABLE(of, of_palmas_rtc_match);
#endif
static struct platform_driver palmas_rtc_driver = …;
module_platform_driver(…) …;
MODULE_ALIAS(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;