#include <linux/io.h>
#include <linux/rtc.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/pm_wakeirq.h>
#include <linux/clk.h>
#include <linux/of.h>
#define RTC_INPUT_CLK_32768HZ …
#define RTC_INPUT_CLK_32000HZ …
#define RTC_INPUT_CLK_38400HZ …
#define RTC_SW_BIT …
#define RTC_ALM_BIT …
#define RTC_1HZ_BIT …
#define RTC_2HZ_BIT …
#define RTC_SAM0_BIT …
#define RTC_SAM1_BIT …
#define RTC_SAM2_BIT …
#define RTC_SAM3_BIT …
#define RTC_SAM4_BIT …
#define RTC_SAM5_BIT …
#define RTC_SAM6_BIT …
#define RTC_SAM7_BIT …
#define PIT_ALL_ON …
#define RTC_ENABLE_BIT …
#define MAX_PIE_NUM …
#define MAX_PIE_FREQ …
#define MXC_RTC_TIME …
#define MXC_RTC_ALARM …
#define RTC_HOURMIN …
#define RTC_SECOND …
#define RTC_ALRM_HM …
#define RTC_ALRM_SEC …
#define RTC_RTCCTL …
#define RTC_RTCISR …
#define RTC_RTCIENR …
#define RTC_STPWCH …
#define RTC_DAYR …
#define RTC_DAYALARM …
#define RTC_TEST1 …
#define RTC_TEST2 …
#define RTC_TEST3 …
enum imx_rtc_type { … };
struct rtc_plat_data { … };
static const struct of_device_id imx_rtc_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, imx_rtc_dt_ids);
static inline int is_imx1_rtc(struct rtc_plat_data *data)
{ … }
static time64_t get_alarm_or_time(struct device *dev, int time_alarm)
{ … }
static void set_alarm_or_time(struct device *dev, int time_alarm, time64_t time)
{ … }
static void rtc_update_alarm(struct device *dev, struct rtc_time *alrm)
{ … }
static void mxc_rtc_irq_enable(struct device *dev, unsigned int bit,
unsigned int enabled)
{ … }
static irqreturn_t mxc_rtc_interrupt(int irq, void *dev_id)
{ … }
static int mxc_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled)
{ … }
static int mxc_rtc_read_time(struct device *dev, struct rtc_time *tm)
{ … }
static int mxc_rtc_set_time(struct device *dev, struct rtc_time *tm)
{ … }
static int mxc_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{ … }
static int mxc_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{ … }
static const struct rtc_class_ops mxc_rtc_ops = …;
static int mxc_rtc_probe(struct platform_device *pdev)
{ … }
static struct platform_driver mxc_rtc_driver = …;
module_platform_driver(…) …
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;