linux/drivers/rtc/rtc-mxc.c

// SPDX-License-Identifier: GPL-2.0+
//
// Copyright 2004-2008 Freescale Semiconductor, Inc. All Rights Reserved.

#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)
{}

/*
 * This function is used to obtain the RTC time or the alarm value in
 * second.
 */
static time64_t get_alarm_or_time(struct device *dev, int time_alarm)
{}

/*
 * This function sets the RTC alarm value or the time value.
 */
static void set_alarm_or_time(struct device *dev, int time_alarm, time64_t time)
{}

/*
 * This function updates the RTC alarm registers and then clears all the
 * interrupt status bits.
 */
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)
{}

/* This function is the RTC interrupt service routine. */
static irqreturn_t mxc_rtc_interrupt(int irq, void *dev_id)
{}

static int mxc_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled)
{}

/*
 * This function reads the current RTC time into tm in Gregorian date.
 */
static int mxc_rtc_read_time(struct device *dev, struct rtc_time *tm)
{}

/*
 * This function sets the internal RTC time based on tm in Gregorian date.
 */
static int mxc_rtc_set_time(struct device *dev, struct rtc_time *tm)
{}

/*
 * This function reads the current alarm value into the passed in 'alrm'
 * argument. It updates the alrm's pending field value based on the whether
 * an alarm interrupt occurs or not.
 */
static int mxc_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{}

/*
 * This function sets the RTC alarm based on passed in alrm.
 */
static int mxc_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{}

/* RTC layer */
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();