linux/drivers/rtc/rtc-em3027.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * An rtc/i2c driver for the EM Microelectronic EM3027
 * Copyright 2011 CompuLab, Ltd.
 *
 * Author: Mike Rapoport <[email protected]>
 *
 * Based on rtc-ds1672.c by Alessandro Zummo <[email protected]>
 */

#include <linux/i2c.h>
#include <linux/rtc.h>
#include <linux/bcd.h>
#include <linux/module.h>
#include <linux/of.h>

/* Registers */
#define EM3027_REG_ON_OFF_CTRL
#define EM3027_REG_IRQ_CTRL
#define EM3027_REG_IRQ_FLAGS
#define EM3027_REG_STATUS
#define EM3027_REG_RST_CTRL

#define EM3027_REG_WATCH_SEC
#define EM3027_REG_WATCH_MIN
#define EM3027_REG_WATCH_HOUR
#define EM3027_REG_WATCH_DATE
#define EM3027_REG_WATCH_DAY
#define EM3027_REG_WATCH_MON
#define EM3027_REG_WATCH_YEAR

#define EM3027_REG_ALARM_SEC
#define EM3027_REG_ALARM_MIN
#define EM3027_REG_ALARM_HOUR
#define EM3027_REG_ALARM_DATE
#define EM3027_REG_ALARM_DAY
#define EM3027_REG_ALARM_MON
#define EM3027_REG_ALARM_YEAR

static struct i2c_driver em3027_driver;

static int em3027_get_time(struct device *dev, struct rtc_time *tm)
{}

static int em3027_set_time(struct device *dev, struct rtc_time *tm)
{}

static const struct rtc_class_ops em3027_rtc_ops =;

static int em3027_probe(struct i2c_client *client)
{}

static const struct i2c_device_id em3027_id[] =;
MODULE_DEVICE_TABLE(i2c, em3027_id);

#ifdef CONFIG_OF
static const struct of_device_id em3027_of_match[] =;
MODULE_DEVICE_TABLE(of, em3027_of_match);
#endif

static struct i2c_driver em3027_driver =;

module_i2c_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();