#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 { … };
static void
m48t59_mem_writeb(struct device *dev, u32 ofs, u8 val)
{ … }
static u8
m48t59_mem_readb(struct device *dev, u32 ofs)
{ … }
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)
{ … }
static int m48t59_rtc_readalarm(struct device *dev, struct rtc_wkalrm *alrm)
{ … }
static int m48t59_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm)
{ … }
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)
{ … }
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)
{ … }
MODULE_ALIAS(…) …;
static struct platform_driver m48t59_rtc_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;