linux/drivers/rtc/rtc-fm3130.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * rtc-fm3130.c - RTC driver for Ramtron FM3130 I2C chip.
 *
 *  Copyright (C) 2008 Sergey Lapin
 *  Based on ds1307 driver by James Chapman and David Brownell
 */

#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/rtc.h>
#include <linux/bcd.h>
#include <linux/slab.h>

#define FM3130_RTC_CONTROL
#define FM3130_CAL_CONTROL
#define FM3130_RTC_SECONDS
#define FM3130_RTC_MINUTES
#define FM3130_RTC_HOURS
#define FM3130_RTC_DAY
#define FM3130_RTC_DATE
#define FM3130_RTC_MONTHS
#define FM3130_RTC_YEARS

#define FM3130_ALARM_SECONDS
#define FM3130_ALARM_MINUTES
#define FM3130_ALARM_HOURS
#define FM3130_ALARM_DATE
#define FM3130_ALARM_MONTHS
#define FM3130_ALARM_WP_CONTROL

#define FM3130_CAL_CONTROL_BIT_nOSCEN
#define FM3130_RTC_CONTROL_BIT_LB
#define FM3130_RTC_CONTROL_BIT_AF
#define FM3130_RTC_CONTROL_BIT_CF
#define FM3130_RTC_CONTROL_BIT_POR
#define FM3130_RTC_CONTROL_BIT_AEN
#define FM3130_RTC_CONTROL_BIT_CAL
#define FM3130_RTC_CONTROL_BIT_WRITE
#define FM3130_RTC_CONTROL_BIT_READ

#define FM3130_CLOCK_REGS
#define FM3130_ALARM_REGS

struct fm3130 {};
static const struct i2c_device_id fm3130_id[] =;
MODULE_DEVICE_TABLE(i2c, fm3130_id);

#define FM3130_MODE_NORMAL
#define FM3130_MODE_WRITE
#define FM3130_MODE_READ

static void fm3130_rtc_mode(struct device *dev, int mode)
{}

static int fm3130_get_time(struct device *dev, struct rtc_time *t)
{}


static int fm3130_set_time(struct device *dev, struct rtc_time *t)
{}

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

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

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

static const struct rtc_class_ops fm3130_rtc_ops =;

static struct i2c_driver fm3130_driver;

static int fm3130_probe(struct i2c_client *client)
{}

static struct i2c_driver fm3130_driver =;

module_i2c_driver();

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