linux/drivers/rtc/rtc-ds1390.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * rtc-ds1390.c -- driver for the Dallas/Maxim DS1390/93/94 SPI RTC
 *
 * Copyright (C) 2008 Mercury IMC Ltd
 * Written by Mark Jackson <[email protected]>
 *
 * NOTE: Currently this driver only supports the bare minimum for read
 * and write the RTC. The extra features provided by the chip family
 * (alarms, trickle charger, different control registers) are unavailable.
 */

#include <linux/init.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/rtc.h>
#include <linux/spi/spi.h>
#include <linux/bcd.h>
#include <linux/slab.h>
#include <linux/of.h>

#define DS1390_REG_100THS
#define DS1390_REG_SECONDS
#define DS1390_REG_MINUTES
#define DS1390_REG_HOURS
#define DS1390_REG_DAY
#define DS1390_REG_DATE
#define DS1390_REG_MONTH_CENT
#define DS1390_REG_YEAR

#define DS1390_REG_ALARM_100THS
#define DS1390_REG_ALARM_SECONDS
#define DS1390_REG_ALARM_MINUTES
#define DS1390_REG_ALARM_HOURS
#define DS1390_REG_ALARM_DAY_DATE

#define DS1390_REG_CONTROL
#define DS1390_REG_STATUS
#define DS1390_REG_TRICKLE

#define DS1390_TRICKLE_CHARGER_ENABLE
#define DS1390_TRICKLE_CHARGER_250_OHM
#define DS1390_TRICKLE_CHARGER_2K_OHM
#define DS1390_TRICKLE_CHARGER_4K_OHM
#define DS1390_TRICKLE_CHARGER_NO_DIODE
#define DS1390_TRICKLE_CHARGER_DIODE

struct ds1390 {};

static void ds1390_set_reg(struct device *dev, unsigned char address,
			   unsigned char data)
{}

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

static void ds1390_trickle_of_init(struct spi_device *spi)
{}

static int ds1390_read_time(struct device *dev, struct rtc_time *dt)
{}

static int ds1390_set_time(struct device *dev, struct rtc_time *dt)
{}

static const struct rtc_class_ops ds1390_rtc_ops =;

static int ds1390_probe(struct spi_device *spi)
{}

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

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

static struct spi_driver ds1390_driver =;

module_spi_driver();

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