#include <linux/bcd.h>
#include <linux/mfd/rohm-bd71815.h>
#include <linux/mfd/rohm-bd71828.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/rtc.h>
#define BD718XX_ALM_EN_OFFSET …
struct bd70528_rtc_day { … } __packed;
struct bd70528_rtc_data { … } __packed;
struct bd71828_rtc_alm { … } __packed;
struct bd70528_rtc { … };
static inline void tmday2rtc(struct rtc_time *t, struct bd70528_rtc_day *d)
{ … }
static inline void tm2rtc(struct rtc_time *t, struct bd70528_rtc_data *r)
{ … }
static inline void rtc2tm(struct bd70528_rtc_data *r, struct rtc_time *t)
{ … }
static int bd71828_set_alarm(struct device *dev, struct rtc_wkalrm *a)
{ … }
static int bd71828_read_alarm(struct device *dev, struct rtc_wkalrm *a)
{ … }
static int bd71828_set_time(struct device *dev, struct rtc_time *t)
{ … }
static int bd70528_get_time(struct device *dev, struct rtc_time *t)
{ … }
static int bd71828_alm_enable(struct device *dev, unsigned int enabled)
{ … }
static const struct rtc_class_ops bd71828_rtc_ops = …;
static irqreturn_t alm_hndlr(int irq, void *data)
{ … }
static int bd70528_probe(struct platform_device *pdev)
{ … }
static const struct platform_device_id bd718x7_rtc_id[] = …;
MODULE_DEVICE_TABLE(platform, bd718x7_rtc_id);
static struct platform_driver bd70528_rtc = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;