#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/spinlock.h>
#include <linux/rtc.h>
#include <linux/slab.h>
#include <linux/io.h>
#include <linux/of.h>
#define LPC32XX_RTC_UCOUNT …
#define LPC32XX_RTC_DCOUNT …
#define LPC32XX_RTC_MATCH0 …
#define LPC32XX_RTC_MATCH1 …
#define LPC32XX_RTC_CTRL …
#define LPC32XX_RTC_INTSTAT …
#define LPC32XX_RTC_KEY …
#define LPC32XX_RTC_SRAM …
#define LPC32XX_RTC_CTRL_MATCH0 …
#define LPC32XX_RTC_CTRL_MATCH1 …
#define LPC32XX_RTC_CTRL_ONSW_MATCH0 …
#define LPC32XX_RTC_CTRL_ONSW_MATCH1 …
#define LPC32XX_RTC_CTRL_SW_RESET …
#define LPC32XX_RTC_CTRL_CNTR_DIS …
#define LPC32XX_RTC_CTRL_ONSW_FORCE_HI …
#define LPC32XX_RTC_INTSTAT_MATCH0 …
#define LPC32XX_RTC_INTSTAT_MATCH1 …
#define LPC32XX_RTC_INTSTAT_ONSW …
#define LPC32XX_RTC_KEY_ONSW_LOADVAL …
#define rtc_readl(dev, reg) …
#define rtc_writel(dev, reg, val) …
struct lpc32xx_rtc { … };
static int lpc32xx_rtc_read_time(struct device *dev, struct rtc_time *time)
{ … }
static int lpc32xx_rtc_set_time(struct device *dev, struct rtc_time *time)
{ … }
static int lpc32xx_rtc_read_alarm(struct device *dev,
struct rtc_wkalrm *wkalrm)
{ … }
static int lpc32xx_rtc_set_alarm(struct device *dev,
struct rtc_wkalrm *wkalrm)
{ … }
static int lpc32xx_rtc_alarm_irq_enable(struct device *dev,
unsigned int enabled)
{ … }
static irqreturn_t lpc32xx_rtc_alarm_interrupt(int irq, void *dev)
{ … }
static const struct rtc_class_ops lpc32xx_rtc_ops = …;
static int lpc32xx_rtc_probe(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM
static int lpc32xx_rtc_suspend(struct device *dev)
{ … }
static int lpc32xx_rtc_resume(struct device *dev)
{ … }
static int lpc32xx_rtc_freeze(struct device *dev)
{ … }
static int lpc32xx_rtc_thaw(struct device *dev)
{ … }
static const struct dev_pm_ops lpc32xx_rtc_pm_ops = …;
#define LPC32XX_RTC_PM_OPS …
#else
#define LPC32XX_RTC_PM_OPS …
#endif
#ifdef CONFIG_OF
static const struct of_device_id lpc32xx_rtc_match[] = …;
MODULE_DEVICE_TABLE(of, lpc32xx_rtc_match);
#endif
static struct platform_driver lpc32xx_rtc_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;