linux/drivers/rtc/rtc-r7301.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * EPSON TOYOCOM RTC-7301SF/DG Driver
 *
 * Copyright (c) 2016 Akinobu Mita <[email protected]>
 *
 * Based on rtc-rp5c01.c
 *
 * Datasheet: http://www5.epsondevice.com/en/products/parallel/rtc7301sf.html
 */

#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/delay.h>
#include <linux/property.h>
#include <linux/regmap.h>
#include <linux/platform_device.h>
#include <linux/rtc.h>

#define DRV_NAME

#define RTC7301_1_SEC
#define RTC7301_10_SEC
#define RTC7301_AE
#define RTC7301_1_MIN
#define RTC7301_10_MIN
#define RTC7301_1_HOUR
#define RTC7301_10_HOUR
#define RTC7301_DAY_OF_WEEK
#define RTC7301_1_DAY
#define RTC7301_10_DAY
#define RTC7301_1_MONTH
#define RTC7301_10_MONTH
#define RTC7301_1_YEAR
#define RTC7301_10_YEAR
#define RTC7301_100_YEAR
#define RTC7301_1000_YEAR
#define RTC7301_ALARM_CONTROL
#define RTC7301_ALARM_CONTROL_AIE
#define RTC7301_ALARM_CONTROL_AF
#define RTC7301_TIMER_CONTROL
#define RTC7301_TIMER_CONTROL_TIE
#define RTC7301_TIMER_CONTROL_TF
#define RTC7301_CONTROL
#define RTC7301_CONTROL_BUSY
#define RTC7301_CONTROL_STOP
#define RTC7301_CONTROL_BANK_SEL_0
#define RTC7301_CONTROL_BANK_SEL_1

struct rtc7301_priv {};

/*
 * When the device is memory-mapped, some platforms pack the registers into
 * 32-bit access using the lower 8 bits at each 4-byte stride, while others
 * expose them as simply consecutive bytes.
 */
static const struct regmap_config rtc7301_regmap_32_config =;

static const struct regmap_config rtc7301_regmap_8_config =;

static u8 rtc7301_read(struct rtc7301_priv *priv, unsigned int reg)
{}

static void rtc7301_write(struct rtc7301_priv *priv, u8 val, unsigned int reg)
{}

static void rtc7301_update_bits(struct rtc7301_priv *priv, unsigned int reg,
				u8 mask, u8 val)
{}

static int rtc7301_wait_while_busy(struct rtc7301_priv *priv)
{}

static void rtc7301_stop(struct rtc7301_priv *priv)
{}

static void rtc7301_start(struct rtc7301_priv *priv)
{}

static void rtc7301_select_bank(struct rtc7301_priv *priv, u8 bank)
{}

static void rtc7301_get_time(struct rtc7301_priv *priv, struct rtc_time *tm,
			     bool alarm)
{}

static void rtc7301_write_time(struct rtc7301_priv *priv, struct rtc_time *tm,
			       bool alarm)
{}

static void rtc7301_alarm_irq(struct rtc7301_priv *priv, unsigned int enabled)
{}

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

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

static int rtc7301_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
{}

static int rtc7301_set_alarm(struct device *dev, struct rtc_wkalrm *alarm)
{}

static int rtc7301_alarm_irq_enable(struct device *dev, unsigned int enabled)
{}

static const struct rtc_class_ops rtc7301_rtc_ops =;

static irqreturn_t rtc7301_irq_handler(int irq, void *dev_id)
{}

static void rtc7301_init(struct rtc7301_priv *priv)
{}

static int __init rtc7301_rtc_probe(struct platform_device *dev)
{}

#ifdef CONFIG_PM_SLEEP

static int rtc7301_suspend(struct device *dev)
{}

static int rtc7301_resume(struct device *dev)
{}

#endif

static SIMPLE_DEV_PM_OPS(rtc7301_pm_ops, rtc7301_suspend, rtc7301_resume);

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

static struct platform_driver rtc7301_rtc_driver =;

module_platform_driver_probe();

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