#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/bcd.h>
#include <linux/rtc.h>
#include <linux/delay.h>
#define MAX6900_REG_SC …
#define MAX6900_REG_MN …
#define MAX6900_REG_HR …
#define MAX6900_REG_DT …
#define MAX6900_REG_MO …
#define MAX6900_REG_DW …
#define MAX6900_REG_YR …
#define MAX6900_REG_CT …
#define MAX6900_REG_CENTURY …
#define MAX6900_REG_LEN …
#define MAX6900_BURST_LEN …
#define MAX6900_REG_CT_WP …
#define MAX6900_REG_CONTROL_WRITE …
#define MAX6900_REG_CENTURY_WRITE …
#define MAX6900_REG_CENTURY_READ …
#define MAX6900_REG_RESERVED_READ …
#define MAX6900_REG_BURST_WRITE …
#define MAX6900_REG_BURST_READ …
#define MAX6900_IDLE_TIME_AFTER_WRITE …
static struct i2c_driver max6900_driver;
static int max6900_i2c_read_regs(struct i2c_client *client, u8 *buf)
{ … }
static int max6900_i2c_write_regs(struct i2c_client *client, u8 const *buf)
{ … }
static int max6900_rtc_read_time(struct device *dev, struct rtc_time *tm)
{ … }
static int max6900_i2c_clear_write_protect(struct i2c_client *client)
{ … }
static int max6900_rtc_set_time(struct device *dev, struct rtc_time *tm)
{ … }
static const struct rtc_class_ops max6900_rtc_ops = …;
static int max6900_probe(struct i2c_client *client)
{ … }
static const struct i2c_device_id max6900_id[] = …;
MODULE_DEVICE_TABLE(i2c, max6900_id);
static struct i2c_driver max6900_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;