#include <linux/bitfield.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/rtc.h>
#include <linux/acpi.h>
#define TOY_TRIM_REG …
#define TOY_WRITE0_REG …
#define TOY_WRITE1_REG …
#define TOY_READ0_REG …
#define TOY_READ1_REG …
#define TOY_MATCH0_REG …
#define TOY_MATCH1_REG …
#define TOY_MATCH2_REG …
#define RTC_CTRL_REG …
#define RTC_TRIM_REG …
#define RTC_WRITE0_REG …
#define RTC_READ0_REG …
#define RTC_MATCH0_REG …
#define RTC_MATCH1_REG …
#define RTC_MATCH2_REG …
#define TOY_MON …
#define TOY_DAY …
#define TOY_HOUR …
#define TOY_MIN …
#define TOY_SEC …
#define TOY_MSEC …
#define TOY_MATCH_YEAR …
#define TOY_MATCH_MON …
#define TOY_MATCH_DAY …
#define TOY_MATCH_HOUR …
#define TOY_MATCH_MIN …
#define TOY_MATCH_SEC …
#define RTC_ENABLE …
#define TOY_ENABLE …
#define OSC_ENABLE …
#define TOY_ENABLE_MASK …
#define PM1_STS_REG …
#define RTC_STS …
#define PM1_EN_REG …
#define RTC_EN …
#define LS1C_RTC_CTRL_WORKAROUND …
struct loongson_rtc_config { … };
struct loongson_rtc_priv { … };
static const struct loongson_rtc_config ls1b_rtc_config = …;
static const struct loongson_rtc_config ls1c_rtc_config = …;
static const struct loongson_rtc_config generic_rtc_config = …;
static const struct loongson_rtc_config ls2k1000_rtc_config = …;
static const struct regmap_config loongson_rtc_regmap_config = …;
static irqreturn_t loongson_rtc_isr(int irq, void *id)
{ … }
static u32 loongson_rtc_handler(void *id)
{ … }
static int loongson_rtc_set_enabled(struct device *dev)
{ … }
static bool loongson_rtc_get_enabled(struct device *dev)
{ … }
static int loongson_rtc_read_time(struct device *dev, struct rtc_time *tm)
{ … }
static int loongson_rtc_set_time(struct device *dev, struct rtc_time *tm)
{ … }
static int loongson_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{ … }
static int loongson_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled)
{ … }
static int loongson_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{ … }
static const struct rtc_class_ops loongson_rtc_ops = …;
static int loongson_rtc_probe(struct platform_device *pdev)
{ … }
static void loongson_rtc_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id loongson_rtc_of_match[] = …;
MODULE_DEVICE_TABLE(of, loongson_rtc_of_match);
static const struct acpi_device_id loongson_rtc_acpi_match[] = …;
MODULE_DEVICE_TABLE(acpi, loongson_rtc_acpi_match);
static struct platform_driver loongson_rtc_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;