linux/drivers/rtc/rtc-m48t59.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * ST M48T59 RTC driver
 *
 * Copyright (c) 2007 Wind River Systems, Inc.
 *
 * Author: Mark Zhan <[email protected]>
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/rtc.h>
#include <linux/rtc/m48t59.h>
#include <linux/bcd.h>
#include <linux/slab.h>

#ifndef NO_IRQ
#define NO_IRQ
#endif

#define M48T59_READ(reg)
#define M48T59_WRITE(val, reg)

#define M48T59_SET_BITS(mask, reg)
#define M48T59_CLEAR_BITS(mask, reg)

struct m48t59_private {};

/*
 * This is the generic access method when the chip is memory-mapped
 */
static void
m48t59_mem_writeb(struct device *dev, u32 ofs, u8 val)
{}

static u8
m48t59_mem_readb(struct device *dev, u32 ofs)
{}

/*
 * NOTE: M48T59 only uses BCD mode
 */
static int m48t59_rtc_read_time(struct device *dev, struct rtc_time *tm)
{}

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

/*
 * Read alarm time and date in RTC
 */
static int m48t59_rtc_readalarm(struct device *dev, struct rtc_wkalrm *alrm)
{}

/*
 * Set alarm time and date in RTC
 */
static int m48t59_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm)
{}

/*
 * Handle commands from user-space
 */
static int m48t59_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled)
{}

static int m48t59_rtc_proc(struct device *dev, struct seq_file *seq)
{}

/*
 * IRQ handler for the RTC
 */
static irqreturn_t m48t59_rtc_interrupt(int irq, void *dev_id)
{}

static const struct rtc_class_ops m48t59_rtc_ops =;

static int m48t59_nvram_read(void *priv, unsigned int offset, void *val,
			     size_t size)
{}

static int m48t59_nvram_write(void *priv, unsigned int offset, void *val,
			      size_t size)
{}

static int m48t59_rtc_probe(struct platform_device *pdev)
{}

/* work with hotplug and coldplug */
MODULE_ALIAS();

static struct platform_driver m48t59_rtc_driver =;

module_platform_driver();

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