#define pr_fmt(fmt) …
#include <linux/clk.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/irqreturn.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
#include <linux/pm_wakeup.h>
#include <linux/reboot.h>
#include <linux/rtc.h>
#include <linux/stat.h>
#include <linux/suspend.h>
struct brcmstb_waketmr { … };
#define BRCMSTB_WKTMR_EVENT …
#define WKTMR_ALARM_EVENT …
#define BRCMSTB_WKTMR_COUNTER …
#define BRCMSTB_WKTMR_ALARM …
#define BRCMSTB_WKTMR_PRESCALER …
#define BRCMSTB_WKTMR_PRESCALER_VAL …
#define BRCMSTB_WKTMR_DEFAULT_FREQ …
static inline bool brcmstb_waketmr_is_pending(struct brcmstb_waketmr *timer)
{ … }
static inline void brcmstb_waketmr_clear_alarm(struct brcmstb_waketmr *timer)
{ … }
static void brcmstb_waketmr_set_alarm(struct brcmstb_waketmr *timer,
unsigned int secs)
{ … }
static irqreturn_t brcmstb_waketmr_irq(int irq, void *data)
{ … }
static irqreturn_t brcmstb_alarm_irq(int irq, void *data)
{ … }
struct wktmr_time { … };
static void wktmr_read(struct brcmstb_waketmr *timer,
struct wktmr_time *t)
{ … }
static int brcmstb_waketmr_prepare_suspend(struct brcmstb_waketmr *timer)
{ … }
static int brcmstb_waketmr_reboot(struct notifier_block *nb,
unsigned long action, void *data)
{ … }
static int brcmstb_waketmr_gettime(struct device *dev,
struct rtc_time *tm)
{ … }
static int brcmstb_waketmr_settime(struct device *dev,
struct rtc_time *tm)
{ … }
static int brcmstb_waketmr_getalarm(struct device *dev,
struct rtc_wkalrm *alarm)
{ … }
static int brcmstb_waketmr_alarm_enable(struct device *dev,
unsigned int enabled)
{ … }
static int brcmstb_waketmr_setalarm(struct device *dev,
struct rtc_wkalrm *alarm)
{ … }
static const struct rtc_class_ops brcmstb_waketmr_ops = …;
static int brcmstb_waketmr_probe(struct platform_device *pdev)
{ … }
static void brcmstb_waketmr_remove(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM_SLEEP
static int brcmstb_waketmr_suspend(struct device *dev)
{ … }
static int brcmstb_waketmr_suspend_noirq(struct device *dev)
{ … }
static int brcmstb_waketmr_resume(struct device *dev)
{ … }
#else
#define brcmstb_waketmr_suspend …
#define brcmstb_waketmr_suspend_noirq …
#define brcmstb_waketmr_resume …
#endif
static const struct dev_pm_ops brcmstb_waketmr_pm_ops = …;
static const __maybe_unused struct of_device_id brcmstb_waketmr_of_match[] = …;
static struct platform_driver brcmstb_waketmr_driver = …;
module_platform_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;