linux/drivers/rtc/rtc-rx4581.c

// SPDX-License-Identifier: GPL-2.0-only
/* drivers/rtc/rtc-rx4581.c
 *
 * written by Torben Hohn <[email protected]>
 *
 * Based on:
 * drivers/rtc/rtc-max6902.c
 *
 * Copyright (C) 2006 8D Technologies inc.
 * Copyright (C) 2004 Compulab Ltd.
 *
 * Driver for MAX6902 spi RTC
 *
 * and based on:
 * drivers/rtc/rtc-rx8581.c
 *
 * 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/kernel.h>
#include <linux/platform_device.h>
#include <linux/init.h>
#include <linux/rtc.h>
#include <linux/spi/spi.h>
#include <linux/bcd.h>

#define RX4581_REG_SC
#define RX4581_REG_MN
#define RX4581_REG_HR
#define RX4581_REG_DW
#define RX4581_REG_DM
#define RX4581_REG_MO
#define RX4581_REG_YR
#define RX4581_REG_RAM
#define RX4581_REG_AMN
#define RX4581_REG_AHR
#define RX4581_REG_ADM
#define RX4581_REG_ADW
#define RX4581_REG_TMR0
#define RX4581_REG_TMR1
#define RX4581_REG_EXT
#define RX4581_REG_FLAG
#define RX4581_REG_CTRL


/* Flag Register bit definitions */
#define RX4581_FLAG_UF
#define RX4581_FLAG_TF
#define RX4581_FLAG_AF
#define RX4581_FLAG_VLF

/* Control Register bit definitions */
#define RX4581_CTRL_UIE
#define RX4581_CTRL_TIE
#define RX4581_CTRL_AIE
#define RX4581_CTRL_STOP
#define RX4581_CTRL_RESET

static int rx4581_set_reg(struct device *dev, unsigned char address,
				unsigned char data)
{}

static int rx4581_get_reg(struct device *dev, unsigned char address,
				unsigned char *data)
{}

/*
 * 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 rx4581_get_datetime(struct device *dev, struct rtc_time *tm)
{}

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

static const struct rtc_class_ops rx4581_rtc_ops =;

static int rx4581_probe(struct spi_device *spi)
{}

static const struct spi_device_id rx4581_id[] =;
MODULE_DEVICE_TABLE(spi, rx4581_id);

static struct spi_driver rx4581_driver =;

module_spi_driver();

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