#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/regmap.h>
#include <linux/mfd/core.h>
#include <linux/mfd/88pm80x.h>
#include <linux/rtc.h>
#define PM800_RTC_COUNTER1 …
#define PM800_RTC_COUNTER2 …
#define PM800_RTC_COUNTER3 …
#define PM800_RTC_COUNTER4 …
#define PM800_RTC_EXPIRE1_1 …
#define PM800_RTC_EXPIRE1_2 …
#define PM800_RTC_EXPIRE1_3 …
#define PM800_RTC_EXPIRE1_4 …
#define PM800_RTC_TRIM1 …
#define PM800_RTC_TRIM2 …
#define PM800_RTC_TRIM3 …
#define PM800_RTC_TRIM4 …
#define PM800_RTC_EXPIRE2_1 …
#define PM800_RTC_EXPIRE2_2 …
#define PM800_RTC_EXPIRE2_3 …
#define PM800_RTC_EXPIRE2_4 …
#define PM800_POWER_DOWN_LOG1 …
#define PM800_POWER_DOWN_LOG2 …
struct pm80x_rtc_info { … };
static irqreturn_t rtc_update_handler(int irq, void *data)
{ … }
static int pm80x_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled)
{ … }
static void rtc_next_alarm_time(struct rtc_time *next, struct rtc_time *now,
struct rtc_time *alrm)
{ … }
static int pm80x_rtc_read_time(struct device *dev, struct rtc_time *tm)
{ … }
static int pm80x_rtc_set_time(struct device *dev, struct rtc_time *tm)
{ … }
static int pm80x_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{ … }
static int pm80x_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{ … }
static const struct rtc_class_ops pm80x_rtc_ops = …;
#ifdef CONFIG_PM_SLEEP
static int pm80x_rtc_suspend(struct device *dev)
{ … }
static int pm80x_rtc_resume(struct device *dev)
{ … }
#endif
static SIMPLE_DEV_PM_OPS(pm80x_rtc_pm_ops, pm80x_rtc_suspend, pm80x_rtc_resume);
static int pm80x_rtc_probe(struct platform_device *pdev)
{ … }
static void pm80x_rtc_remove(struct platform_device *pdev)
{ … }
static struct platform_driver pm80x_rtc_driver = …;
module_platform_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_ALIAS(…) …;