#include <linux/device.h>
#include <linux/err.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/platform_device.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/fsl/ftm.h>
#include <linux/rtc.h>
#include <linux/time.h>
#include <linux/acpi.h>
#include <linux/pm_wakeirq.h>
#define FTM_SC_CLK(c) …
#define FTM_SC_CLKS_FIXED_FREQ …
#define FIXED_FREQ_CLK …
#define MAX_FREQ_DIV …
#define MAX_COUNT_VAL …
struct ftm_rtc { … };
static inline u32 rtc_readl(struct ftm_rtc *dev, u32 reg)
{ … }
static inline void rtc_writel(struct ftm_rtc *dev, u32 reg, u32 val)
{ … }
static inline void ftm_counter_enable(struct ftm_rtc *rtc)
{ … }
static inline void ftm_counter_disable(struct ftm_rtc *rtc)
{ … }
static inline void ftm_irq_acknowledge(struct ftm_rtc *rtc)
{ … }
static inline void ftm_irq_enable(struct ftm_rtc *rtc)
{ … }
static inline void ftm_irq_disable(struct ftm_rtc *rtc)
{ … }
static inline void ftm_reset_counter(struct ftm_rtc *rtc)
{ … }
static void ftm_clean_alarm(struct ftm_rtc *rtc)
{ … }
static irqreturn_t ftm_rtc_alarm_interrupt(int irq, void *dev)
{ … }
static int ftm_rtc_alarm_irq_enable(struct device *dev,
unsigned int enabled)
{ … }
static int ftm_rtc_read_time(struct device *dev, struct rtc_time *tm)
{ … }
static int ftm_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm)
{ … }
static int ftm_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm)
{ … }
static const struct rtc_class_ops ftm_rtc_ops = …;
static int ftm_rtc_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id ftm_rtc_match[] = …;
MODULE_DEVICE_TABLE(of, ftm_rtc_match);
static const struct acpi_device_id ftm_imx_acpi_ids[] = …;
MODULE_DEVICE_TABLE(acpi, ftm_imx_acpi_ids);
static struct platform_driver ftm_rtc_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;