#include <linux/init.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/mfd/syscon.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>
#define BBNSM_CTRL …
#define BBNSM_INT_EN …
#define BBNSM_EVENTS …
#define BBNSM_RTC_LS …
#define BBNSM_RTC_MS …
#define BBNSM_TA …
#define RTC_EN …
#define RTC_EN_MSK …
#define TA_EN …
#define TA_DIS …
#define TA_EN_MSK …
#define RTC_INT_EN …
#define TA_INT_EN …
#define BBNSM_EVENT_TA …
#define CNTR_TO_SECS_SH …
struct bbnsm_rtc { … };
static u32 bbnsm_read_counter(struct bbnsm_rtc *bbnsm)
{ … }
static int bbnsm_rtc_read_time(struct device *dev, struct rtc_time *tm)
{ … }
static int bbnsm_rtc_set_time(struct device *dev, struct rtc_time *tm)
{ … }
static int bbnsm_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{ … }
static int bbnsm_rtc_alarm_irq_enable(struct device *dev, unsigned int enable)
{ … }
static int bbnsm_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{ … }
static const struct rtc_class_ops bbnsm_rtc_ops = …;
static irqreturn_t bbnsm_rtc_irq_handler(int irq, void *dev_id)
{ … }
static int bbnsm_rtc_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id bbnsm_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, bbnsm_dt_ids);
static struct platform_driver bbnsm_rtc_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;