#include <linux/bcd.h>
#include <linux/bitops.h>
#include <linux/i2c.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/regmap.h>
#include <linux/rtc.h>
#define RX8010_SEC …
#define RX8010_MIN …
#define RX8010_HOUR …
#define RX8010_WDAY …
#define RX8010_MDAY …
#define RX8010_MONTH …
#define RX8010_YEAR …
#define RX8010_RESV17 …
#define RX8010_ALMIN …
#define RX8010_ALHOUR …
#define RX8010_ALWDAY …
#define RX8010_TCOUNT0 …
#define RX8010_TCOUNT1 …
#define RX8010_EXT …
#define RX8010_FLAG …
#define RX8010_CTRL …
#define RX8010_RESV30 …
#define RX8010_RESV31 …
#define RX8010_IRQ …
#define RX8010_EXT_WADA …
#define RX8010_FLAG_VLF …
#define RX8010_FLAG_AF …
#define RX8010_FLAG_TF …
#define RX8010_FLAG_UF …
#define RX8010_CTRL_AIE …
#define RX8010_CTRL_UIE …
#define RX8010_CTRL_STOP …
#define RX8010_CTRL_TEST …
#define RX8010_ALARM_AE …
static const struct i2c_device_id rx8010_id[] = …;
MODULE_DEVICE_TABLE(i2c, rx8010_id);
static const __maybe_unused struct of_device_id rx8010_of_match[] = …;
MODULE_DEVICE_TABLE(of, rx8010_of_match);
struct rx8010_data { … };
static irqreturn_t rx8010_irq_1_handler(int irq, void *dev_id)
{ … }
static int rx8010_get_time(struct device *dev, struct rtc_time *dt)
{ … }
static int rx8010_set_time(struct device *dev, struct rtc_time *dt)
{ … }
static int rx8010_init(struct device *dev)
{ … }
static int rx8010_read_alarm(struct device *dev, struct rtc_wkalrm *t)
{ … }
static int rx8010_set_alarm(struct device *dev, struct rtc_wkalrm *t)
{ … }
static int rx8010_alarm_irq_enable(struct device *dev,
unsigned int enabled)
{ … }
static int rx8010_ioctl(struct device *dev, unsigned int cmd, unsigned long arg)
{ … }
static const struct rtc_class_ops rx8010_rtc_ops = …;
static const struct regmap_config rx8010_regmap_config = …;
static int rx8010_probe(struct i2c_client *client)
{ … }
static struct i2c_driver rx8010_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;