#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/time.h>
#include <linux/rtc.h>
#include <linux/slab.h>
#include <linux/bcd.h>
#include <linux/interrupt.h>
#include <linux/ioctl.h>
#include <linux/completion.h>
#include <linux/mfd/wm831x/core.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/random.h>
#define WM831X_RTC_WR_CNT_MASK …
#define WM831X_RTC_WR_CNT_SHIFT …
#define WM831X_RTC_WR_CNT_WIDTH …
#define WM831X_RTC_TIME_MASK …
#define WM831X_RTC_TIME_SHIFT …
#define WM831X_RTC_TIME_WIDTH …
#define WM831X_RTC_TIME_MASK …
#define WM831X_RTC_TIME_SHIFT …
#define WM831X_RTC_TIME_WIDTH …
#define WM831X_RTC_ALM_MASK …
#define WM831X_RTC_ALM_SHIFT …
#define WM831X_RTC_ALM_WIDTH …
#define WM831X_RTC_ALM_MASK …
#define WM831X_RTC_ALM_SHIFT …
#define WM831X_RTC_ALM_WIDTH …
#define WM831X_RTC_VALID …
#define WM831X_RTC_VALID_MASK …
#define WM831X_RTC_VALID_SHIFT …
#define WM831X_RTC_VALID_WIDTH …
#define WM831X_RTC_SYNC_BUSY …
#define WM831X_RTC_SYNC_BUSY_MASK …
#define WM831X_RTC_SYNC_BUSY_SHIFT …
#define WM831X_RTC_SYNC_BUSY_WIDTH …
#define WM831X_RTC_ALM_ENA …
#define WM831X_RTC_ALM_ENA_MASK …
#define WM831X_RTC_ALM_ENA_SHIFT …
#define WM831X_RTC_ALM_ENA_WIDTH …
#define WM831X_RTC_PINT_FREQ_MASK …
#define WM831X_RTC_PINT_FREQ_SHIFT …
#define WM831X_RTC_PINT_FREQ_WIDTH …
#define WM831X_RTC_TRIM_MASK …
#define WM831X_RTC_TRIM_SHIFT …
#define WM831X_RTC_TRIM_WIDTH …
#define WM831X_SET_TIME_RETRIES …
#define WM831X_GET_TIME_RETRIES …
struct wm831x_rtc { … };
static void wm831x_rtc_add_randomness(struct wm831x *wm831x)
{ … }
static int wm831x_rtc_readtime(struct device *dev, struct rtc_time *tm)
{ … }
static int wm831x_rtc_settime(struct device *dev, struct rtc_time *tm)
{ … }
static int wm831x_rtc_readalarm(struct device *dev, struct rtc_wkalrm *alrm)
{ … }
static int wm831x_rtc_stop_alarm(struct wm831x_rtc *wm831x_rtc)
{ … }
static int wm831x_rtc_start_alarm(struct wm831x_rtc *wm831x_rtc)
{ … }
static int wm831x_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm)
{ … }
static int wm831x_rtc_alarm_irq_enable(struct device *dev,
unsigned int enabled)
{ … }
static irqreturn_t wm831x_alm_irq(int irq, void *data)
{ … }
static const struct rtc_class_ops wm831x_rtc_ops = …;
#ifdef CONFIG_PM
static int wm831x_rtc_suspend(struct device *dev)
{ … }
static int wm831x_rtc_resume(struct device *dev)
{ … }
static int wm831x_rtc_freeze(struct device *dev)
{ … }
#else
#define wm831x_rtc_suspend …
#define wm831x_rtc_resume …
#define wm831x_rtc_freeze …
#endif
static int wm831x_rtc_probe(struct platform_device *pdev)
{ … }
static const struct dev_pm_ops wm831x_rtc_pm_ops = …;
static struct platform_driver wm831x_rtc_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;