linux/drivers/rtc/rtc-ds1742.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * An rtc driver for the Dallas DS1742
 *
 * Copyright (C) 2006 Atsushi Nemoto <[email protected]>
 *
 * Copyright (C) 2006 Torsten Ertbjerg Rasmussen <[email protected]>
 *  - nvram size determined from resource
 *  - this ds1742 driver now supports ds1743.
 */

#include <linux/bcd.h>
#include <linux/kernel.h>
#include <linux/gfp.h>
#include <linux/delay.h>
#include <linux/jiffies.h>
#include <linux/rtc.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/module.h>

#define RTC_SIZE

#define RTC_CONTROL
#define RTC_CENTURY
#define RTC_SECONDS
#define RTC_MINUTES
#define RTC_HOURS
#define RTC_DAY
#define RTC_DATE
#define RTC_MONTH
#define RTC_YEAR

#define RTC_CENTURY_MASK
#define RTC_SECONDS_MASK
#define RTC_DAY_MASK

/* Bits in the Control/Century register */
#define RTC_WRITE
#define RTC_READ

/* Bits in the Seconds register */
#define RTC_STOP

/* Bits in the Day register */
#define RTC_BATT_FLAG

struct rtc_plat_data {};

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

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

static const struct rtc_class_ops ds1742_rtc_ops =;

static int ds1742_nvram_read(void *priv, unsigned int pos, void *val,
			     size_t bytes)
{}

static int ds1742_nvram_write(void *priv, unsigned int pos, void *val,
			      size_t bytes)
{}

static int ds1742_rtc_probe(struct platform_device *pdev)
{}

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

static struct platform_driver ds1742_rtc_driver =;

module_platform_driver();

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