#include <linux/init.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/rtc.h>
#include <linux/time.h>
#define EXICSR …
#define EXICR …
#define EXIDATA …
#define EXICSR_DEV …
#define EXICSR_DEV1 …
#define EXICSR_CLK …
#define EXICSR_CLK_1MHZ …
#define EXICSR_CLK_2MHZ …
#define EXICSR_CLK_4MHZ …
#define EXICSR_CLK_8MHZ …
#define EXICSR_CLK_16MHZ …
#define EXICSR_CLK_32MHZ …
#define EXICSR_INT …
#define EXICSR_INTSET …
#define EXICR_TSTART …
#define EXICR_TRSMODE …
#define EXICR_TRSMODE_IMM …
#define EXICR_TRSTYPE …
#define EXICR_TRSTYPE_R …
#define EXICR_TRSTYPE_W …
#define EXICR_TLEN …
#define EXICR_TLEN32 …
#define RTC_EXICSR …
#define RTC_EXICR_W …
#define RTC_EXICR_R …
#define RTC_EXIDATA_W …
#define RTC_COUNTER …
#define RTC_SRAM …
#define RTC_SRAM_BIAS …
#define RTC_SNAPSHOT …
#define RTC_ONTMR …
#define RTC_OFFTMR …
#define RTC_TEST0 …
#define RTC_TEST1 …
#define RTC_TEST2 …
#define RTC_TEST3 …
#define RTC_CONTROL0 …
#define RTC_CONTROL1 …
#define RTC_CONTROL0_UNSTABLE_POWER …
#define RTC_CONTROL0_LOW_BATTERY …
struct priv { … };
static int exi_read(void *context, u32 reg, u32 *data)
{ … }
static int exi_write(void *context, u32 reg, u32 data)
{ … }
static const struct regmap_bus exi_bus = …;
static int gamecube_rtc_read_time(struct device *dev, struct rtc_time *t)
{ … }
static int gamecube_rtc_set_time(struct device *dev, struct rtc_time *t)
{ … }
static int gamecube_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long arg)
{ … }
static const struct rtc_class_ops gamecube_rtc_ops = …;
static int gamecube_rtc_read_offset_from_sram(struct priv *d)
{ … }
static const struct regmap_range rtc_rd_ranges[] = …;
static const struct regmap_access_table rtc_rd_regs = …;
static const struct regmap_range rtc_wr_ranges[] = …;
static const struct regmap_access_table rtc_wr_regs = …;
static const struct regmap_config gamecube_rtc_regmap_config = …;
static int gamecube_rtc_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id gamecube_rtc_of_match[] = …;
MODULE_DEVICE_TABLE(of, gamecube_rtc_of_match);
static struct platform_driver gamecube_rtc_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;