#include <linux/io.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/rtc.h>
#include <linux/goldfish.h>
#include <clocksource/timer-goldfish.h>
struct goldfish_rtc { … };
static int goldfish_rtc_read_alarm(struct device *dev,
struct rtc_wkalrm *alrm)
{ … }
static int goldfish_rtc_set_alarm(struct device *dev,
struct rtc_wkalrm *alrm)
{ … }
static int goldfish_rtc_alarm_irq_enable(struct device *dev,
unsigned int enabled)
{ … }
static irqreturn_t goldfish_rtc_interrupt(int irq, void *dev_id)
{ … }
static int goldfish_rtc_read_time(struct device *dev, struct rtc_time *tm)
{ … }
static int goldfish_rtc_set_time(struct device *dev, struct rtc_time *tm)
{ … }
static const struct rtc_class_ops goldfish_rtc_ops = …;
static int goldfish_rtc_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id goldfish_rtc_of_match[] = …;
MODULE_DEVICE_TABLE(of, goldfish_rtc_of_match);
static struct platform_driver goldfish_rtc = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;