#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/rtc.h>
#include <linux/spi/spi.h>
#include <linux/bcd.h>
#define M41T94_REG_SECONDS …
#define M41T94_REG_MINUTES …
#define M41T94_REG_HOURS …
#define M41T94_REG_WDAY …
#define M41T94_REG_DAY …
#define M41T94_REG_MONTH …
#define M41T94_REG_YEAR …
#define M41T94_REG_HT …
#define M41T94_BIT_HALT …
#define M41T94_BIT_STOP …
#define M41T94_BIT_CB …
#define M41T94_BIT_CEB …
static int m41t94_set_time(struct device *dev, struct rtc_time *tm)
{ … }
static int m41t94_read_time(struct device *dev, struct rtc_time *tm)
{ … }
static const struct rtc_class_ops m41t94_rtc_ops = …;
static struct spi_driver m41t94_driver;
static int m41t94_probe(struct spi_device *spi)
{ … }
static struct spi_driver m41t94_driver = …;
module_spi_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;