#include <linux/delay.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_wakeirq.h>
#include <linux/regmap.h>
#include <linux/rtc.h>
#include <linux/slab.h>
#include <linux/mfd/da9062/registers.h>
#include <linux/mfd/da9063/registers.h>
#include <linux/mfd/da9063/core.h>
#define YEARS_TO_DA9063(year) …
#define MONTHS_TO_DA9063(month) …
#define YEARS_FROM_DA9063(year) …
#define MONTHS_FROM_DA9063(month) …
enum { … };
struct da9063_compatible_rtc_regmap { … };
struct da9063_compatible_rtc { … };
static const struct da9063_compatible_rtc_regmap da9063_ad_regs = …;
static const struct da9063_compatible_rtc_regmap da9063_bb_regs = …;
static const struct da9063_compatible_rtc_regmap da9062_aa_regs = …;
static const struct of_device_id da9063_compatible_reg_id_table[] = …;
MODULE_DEVICE_TABLE(of, da9063_compatible_reg_id_table);
static void da9063_data_to_tm(u8 *data, struct rtc_time *tm,
struct da9063_compatible_rtc *rtc)
{ … }
static void da9063_tm_to_data(struct rtc_time *tm, u8 *data,
struct da9063_compatible_rtc *rtc)
{ … }
static int da9063_rtc_stop_alarm(struct device *dev)
{ … }
static int da9063_rtc_start_alarm(struct device *dev)
{ … }
static int da9063_rtc_read_time(struct device *dev, struct rtc_time *tm)
{ … }
static int da9063_rtc_set_time(struct device *dev, struct rtc_time *tm)
{ … }
static int da9063_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{ … }
static int da9063_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{ … }
static int da9063_rtc_alarm_irq_enable(struct device *dev,
unsigned int enabled)
{ … }
static irqreturn_t da9063_alarm_event(int irq, void *data)
{ … }
static const struct rtc_class_ops da9063_rtc_ops = …;
static int da9063_rtc_probe(struct platform_device *pdev)
{ … }
static struct platform_driver da9063_rtc_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;