linux/drivers/rtc/rtc-lpc24xx.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * RTC driver for NXP LPC178x/18xx/43xx Real-Time Clock (RTC)
 *
 * Copyright (C) 2011 NXP Semiconductors
 * Copyright (C) 2015 Joachim Eastwood <[email protected]>
 */

#include <linux/clk.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/rtc.h>

/* LPC24xx RTC register offsets and bits */
#define LPC24XX_ILR
#define LPC24XX_RTCCIF
#define LPC24XX_RTCALF
#define LPC24XX_CTC
#define LPC24XX_CCR
#define LPC24XX_CLKEN
#define LPC178X_CCALEN
#define LPC24XX_CIIR
#define LPC24XX_AMR
#define LPC24XX_ALARM_DISABLE
#define LPC24XX_CTIME0
#define LPC24XX_CTIME1
#define LPC24XX_CTIME2
#define LPC24XX_SEC
#define LPC24XX_MIN
#define LPC24XX_HOUR
#define LPC24XX_DOM
#define LPC24XX_DOW
#define LPC24XX_DOY
#define LPC24XX_MONTH
#define LPC24XX_YEAR
#define LPC24XX_ALSEC
#define LPC24XX_ALMIN
#define LPC24XX_ALHOUR
#define LPC24XX_ALDOM
#define LPC24XX_ALDOW
#define LPC24XX_ALDOY
#define LPC24XX_ALMON
#define LPC24XX_ALYEAR

/* Macros to read fields in consolidated time (CT) registers */
#define CT0_SECS(x)
#define CT0_MINS(x)
#define CT0_HOURS(x)
#define CT0_DOW(x)
#define CT1_DOM(x)
#define CT1_MONTH(x)
#define CT1_YEAR(x)
#define CT2_DOY(x)

#define rtc_readl(dev, reg)
#define rtc_writel(dev, reg, val)

struct lpc24xx_rtc {};

static int lpc24xx_rtc_set_time(struct device *dev, struct rtc_time *tm)
{}

static int lpc24xx_rtc_read_time(struct device *dev, struct rtc_time *tm)
{}

static int lpc24xx_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *wkalrm)
{}

static int lpc24xx_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *wkalrm)
{}

static int lpc24xx_rtc_alarm_irq_enable(struct device *dev, unsigned int enable)
{}

static irqreturn_t lpc24xx_rtc_interrupt(int irq, void *data)
{}

static const struct rtc_class_ops lpc24xx_rtc_ops =;

static int lpc24xx_rtc_probe(struct platform_device *pdev)
{}

static void lpc24xx_rtc_remove(struct platform_device *pdev)
{}

static const struct of_device_id lpc24xx_rtc_match[] =;
MODULE_DEVICE_TABLE(of, lpc24xx_rtc_match);

static struct platform_driver lpc24xx_rtc_driver =;
module_platform_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();