#include <linux/err.h>
#include <linux/irqdomain.h>
#include <linux/mfd/lp8788.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/rtc.h>
#include <linux/slab.h>
#define LP8788_INTEN_3 …
#define LP8788_RTC_UNLOCK …
#define LP8788_RTC_SEC …
#define LP8788_ALM1_SEC …
#define LP8788_ALM1_EN …
#define LP8788_ALM2_SEC …
#define LP8788_ALM2_EN …
#define LP8788_INT_RTC_ALM1_M …
#define LP8788_INT_RTC_ALM1_S …
#define LP8788_INT_RTC_ALM2_M …
#define LP8788_INT_RTC_ALM2_S …
#define LP8788_ALM_EN_M …
#define LP8788_ALM_EN_S …
#define DEFAULT_ALARM_SEL …
#define LP8788_MONTH_OFFSET …
#define LP8788_BASE_YEAR …
#define MAX_WDAY_BITS …
#define LP8788_WDAY_SET …
#define RTC_UNLOCK …
#define RTC_LATCH …
#define ALARM_IRQ_FLAG …
enum lp8788_time { … };
struct lp8788_rtc { … };
static const u8 addr_alarm_sec[LP8788_ALARM_MAX] = …;
static const u8 addr_alarm_en[LP8788_ALARM_MAX] = …;
static const u8 mask_alarm_en[LP8788_ALARM_MAX] = …;
static const u8 shift_alarm_en[LP8788_ALARM_MAX] = …;
static int _to_tm_wday(u8 lp8788_wday)
{ … }
static inline int _to_lp8788_wday(int tm_wday)
{ … }
static void lp8788_rtc_unlock(struct lp8788 *lp)
{ … }
static int lp8788_rtc_read_time(struct device *dev, struct rtc_time *tm)
{ … }
static int lp8788_rtc_set_time(struct device *dev, struct rtc_time *tm)
{ … }
static int lp8788_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
{ … }
static int lp8788_set_alarm(struct device *dev, struct rtc_wkalrm *alarm)
{ … }
static int lp8788_alarm_irq_enable(struct device *dev, unsigned int enable)
{ … }
static const struct rtc_class_ops lp8788_rtc_ops = …;
static irqreturn_t lp8788_alarm_irq_handler(int irq, void *ptr)
{ … }
static int lp8788_alarm_irq_register(struct platform_device *pdev,
struct lp8788_rtc *rtc)
{ … }
static int lp8788_rtc_probe(struct platform_device *pdev)
{ … }
static struct platform_driver lp8788_rtc_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;