linux/drivers/rtc/rtc-rx8111.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Driver for Epson RX8111 RTC.
 *
 * Copyright (C) 2023 Axis Communications AB
 */

#include <linux/bcd.h>
#include <linux/bitfield.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/regmap.h>

#include <linux/rtc.h>

#define RX8111_REG_SEC
#define RX8111_REG_MIN
#define RX8111_REG_HOUR
#define RX8111_REG_WEEK
#define RX8111_REG_DAY
#define RX8111_REG_MONTH
#define RX8111_REG_YEAR

#define RX8111_REG_ALARM_MIN
#define RX8111_REG_ALARM_HOUR
#define RX8111_REG_ALARM_WEEK_DAY

#define RX8111_REG_TIMER_COUNTER0
#define RX8111_REG_TIMER_COUNTER1
#define RX8111_REG_TIMER_COUNTER2

#define RX8111_REG_EXT
#define RX8111_REG_FLAG
#define RX8111_REG_CTRL

#define RX8111_REG_TS_1_1000_SEC
#define RX8111_REG_TS_1_100_SEC
#define RX8111_REG_TS_SEC
#define RX8111_REG_TS_MIN
#define RX8111_REG_TS_HOUR
#define RX8111_REG_TS_WEEK
#define RX8111_REG_TS_DAY
#define RX8111_REG_TS_MONTH
#define RX8111_REG_TS_YEAR
#define RX8111_REG_TS_STATUS

#define RX8111_REG_EVIN_SETTING
#define RX8111_REG_ALARM_SEC
#define RX8111_REG_TIMER_CTRL
#define RX8111_REG_TS_CTRL0
#define RX8111_REG_CMD_TRIGGER
#define RX8111_REG_PWR_SWITCH_CTRL
#define RX8111_REG_STATUS_MON
#define RX8111_REG_TS_CTRL1
#define RX8111_REG_TS_CTRL2
#define RX8111_REG_TS_CTRL3

#define RX8111_FLAG_XST_BIT
#define RX8111_FLAG_VLF_BIT

#define RX8111_TIME_BUF_SZ

enum rx8111_regfield {};

static const struct reg_field rx8111_regfields[] =;

static const struct regmap_config rx8111_regmap_config =;

struct rx8111_data {};

static int rx8111_read_vl_flag(struct rx8111_data *data, unsigned int *vlval)
{}

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

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

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

static const struct rtc_class_ops rx8111_rtc_ops =;

static int rx8111_probe(struct i2c_client *client)
{}

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

static struct i2c_driver rx8111_driver =;
module_i2c_driver();

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