linux/drivers/rtc/rtc-rv8803.c

// SPDX-License-Identifier: GPL-2.0
/*
 * RTC driver for the Micro Crystal RV8803
 *
 * Copyright (C) 2015 Micro Crystal SA
 * Alexandre Belloni <[email protected]>
 *
 */

#include <linux/bcd.h>
#include <linux/bitops.h>
#include <linux/bitfield.h>
#include <linux/log2.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/rtc.h>
#include <linux/pm_wakeirq.h>

#define RV8803_I2C_TRY_COUNT

#define RV8803_SEC
#define RV8803_MIN
#define RV8803_HOUR
#define RV8803_WEEK
#define RV8803_DAY
#define RV8803_MONTH
#define RV8803_YEAR
#define RV8803_RAM
#define RV8803_ALARM_MIN
#define RV8803_ALARM_HOUR
#define RV8803_ALARM_WEEK_OR_DAY
#define RV8803_EXT
#define RV8803_FLAG
#define RV8803_CTRL
#define RV8803_OSC_OFFSET

#define RV8803_EXT_WADA

#define RV8803_FLAG_V1F
#define RV8803_FLAG_V2F
#define RV8803_FLAG_AF
#define RV8803_FLAG_TF
#define RV8803_FLAG_UF

#define RV8803_CTRL_RESET

#define RV8803_CTRL_EIE
#define RV8803_CTRL_AIE
#define RV8803_CTRL_TIE
#define RV8803_CTRL_UIE

#define RX8803_CTRL_CSEL

#define RX8900_BACKUP_CTRL
#define RX8900_FLAG_SWOFF
#define RX8900_FLAG_VDETOFF

enum rv8803_type {};

struct rv8803_data {};

static int rv8803_read_reg(const struct i2c_client *client, u8 reg)
{}

static int rv8803_read_regs(const struct i2c_client *client,
			    u8 reg, u8 count, u8 *values)
{}

static int rv8803_write_reg(const struct i2c_client *client, u8 reg, u8 value)
{}

static int rv8803_write_regs(const struct i2c_client *client,
			     u8 reg, u8 count, const u8 *values)
{}

static int rv8803_regs_init(struct rv8803_data *rv8803)
{}

static int rv8803_regs_configure(struct rv8803_data *rv8803);

static int rv8803_regs_reset(struct rv8803_data *rv8803, bool full)
{}

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

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

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

static int rv8803_get_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{}

static int rv8803_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{}

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

static int rv8803_ioctl(struct device *dev, unsigned int cmd, unsigned long arg)
{}

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

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

static const struct rtc_class_ops rv8803_rtc_ops =;

static int rx8900_trickle_charger_init(struct rv8803_data *rv8803)
{}

/* configure registers with values different than the Power-On reset defaults */
static int rv8803_regs_configure(struct rv8803_data *rv8803)
{}

static int rv8803_resume(struct device *dev)
{}

static int rv8803_suspend(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(rv8803_pm_ops, rv8803_suspend, rv8803_resume);

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

static int rv8803_probe(struct i2c_client *client)
{}

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

static struct i2c_driver rv8803_driver =;
module_i2c_driver();

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