linux/drivers/rtc/rtc-rx8581.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * An I2C driver for the Epson RX8581 RTC
 *
 * Author: Martyn Welch <[email protected]>
 * Copyright 2008 GE Intelligent Platforms Embedded Systems, Inc.
 *
 * Based on: rtc-pcf8563.c (An I2C driver for the Philips PCF8563 RTC)
 * Copyright 2005-06 Tower Technologies
 */

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

#define RX8581_REG_SC
#define RX8581_REG_MN
#define RX8581_REG_HR
#define RX8581_REG_DW
#define RX8581_REG_DM
#define RX8581_REG_MO
#define RX8581_REG_YR
#define RX8581_REG_RAM
#define RX8581_REG_AMN
#define RX8581_REG_AHR
#define RX8581_REG_ADM
#define RX8581_REG_ADW
#define RX8581_REG_TMR0
#define RX8581_REG_TMR1
#define RX8581_REG_EXT
#define RX8581_REG_FLAG
#define RX8581_REG_CTRL


/* Flag Register bit definitions */
#define RX8581_FLAG_UF
#define RX8581_FLAG_TF
#define RX8581_FLAG_AF
#define RX8581_FLAG_VLF

/* Control Register bit definitions */
#define RX8581_CTRL_UIE
#define RX8581_CTRL_TIE
#define RX8581_CTRL_AIE
#define RX8581_CTRL_STOP
#define RX8581_CTRL_RESET

#define RX8571_USER_RAM
#define RX8571_NVRAM_SIZE

struct rx8581 {};

struct rx85x1_config {};

/*
 * In the routines that deal directly with the rx8581 hardware, we use
 * rtc_time -- month 0-11, hour 0-23, yr = calendar year-epoch.
 */
static int rx8581_rtc_read_time(struct device *dev, struct rtc_time *tm)
{}

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

static const struct rtc_class_ops rx8581_rtc_ops =;

static int rx8571_nvram_read(void *priv, unsigned int offset, void *val,
			     size_t bytes)
{}

static int rx8571_nvram_write(void *priv, unsigned int offset, void *val,
			      size_t bytes)
{}

static int rx85x1_nvram_read(void *priv, unsigned int offset, void *val,
			     size_t bytes)
{}

static int rx85x1_nvram_write(void *priv, unsigned int offset, void *val,
			      size_t bytes)
{}

static const struct rx85x1_config rx8581_config =;

static const struct rx85x1_config rx8571_config =;

static int rx8581_probe(struct i2c_client *client)
{}

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

static const __maybe_unused struct of_device_id rx8581_of_match[] =;
MODULE_DEVICE_TABLE(of, rx8581_of_match);

static struct i2c_driver rx8581_driver =;

module_i2c_driver();

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