#include <linux/init.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/rtc.h>
#include <linux/spi/spi.h>
#include <linux/bcd.h>
#define MAX6916_SECONDS_REG …
#define MAX6916_MINUTES_REG …
#define MAX6916_HOURS_REG …
#define MAX6916_DATE_REG …
#define MAX6916_MONTH_REG …
#define MAX6916_DAY_REG …
#define MAX6916_YEAR_REG …
#define MAX6916_CONTROL_REG …
#define MAX6916_STATUS_REG …
#define MAX6916_CLOCK_BURST …
static int max6916_read_reg(struct device *dev, unsigned char address,
unsigned char *data)
{ … }
static int max6916_write_reg(struct device *dev, unsigned char address,
unsigned char data)
{ … }
static int max6916_read_time(struct device *dev, struct rtc_time *dt)
{ … }
static int max6916_set_time(struct device *dev, struct rtc_time *dt)
{ … }
static const struct rtc_class_ops max6916_rtc_ops = …;
static int max6916_probe(struct spi_device *spi)
{ … }
static struct spi_driver max6916_driver = …;
module_spi_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;