#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/rtc.h>
#include <linux/bcd.h>
#include <linux/math64.h>
#include <linux/property.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
#include <linux/mfd/tps65910.h>
struct tps65910_rtc { … };
#define NUM_TIME_REGS …
#define NUM_COMP_REGS …
#define MIN_OFFSET …
#define MAX_OFFSET …
#define TICKS_PER_HOUR …
#define PPB_MULT …
static int tps65910_rtc_alarm_irq_enable(struct device *dev,
unsigned int enabled)
{ … }
static int tps65910_rtc_read_time(struct device *dev, struct rtc_time *tm)
{ … }
static int tps65910_rtc_set_time(struct device *dev, struct rtc_time *tm)
{ … }
static int tps65910_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm)
{ … }
static int tps65910_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm)
{ … }
static int tps65910_rtc_set_calibration(struct device *dev, int calibration)
{ … }
static int tps65910_rtc_get_calibration(struct device *dev, int *calibration)
{ … }
static int tps65910_read_offset(struct device *dev, long *offset)
{ … }
static int tps65910_set_offset(struct device *dev, long offset)
{ … }
static irqreturn_t tps65910_rtc_interrupt(int irq, void *rtc)
{ … }
static const struct rtc_class_ops tps65910_rtc_ops = …;
static int tps65910_rtc_probe(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM_SLEEP
static int tps65910_rtc_suspend(struct device *dev)
{ … }
static int tps65910_rtc_resume(struct device *dev)
{ … }
#endif
static SIMPLE_DEV_PM_OPS(tps65910_rtc_pm_ops, tps65910_rtc_suspend,
tps65910_rtc_resume);
static struct platform_driver tps65910_rtc_driver = …;
module_platform_driver(…) …;
MODULE_ALIAS(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;