#include <linux/i2c.h>
#include <linux/slab.h>
#include <linux/rtc.h>
#include <linux/delay.h>
#include <linux/mutex.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/mfd/max77686-private.h>
#include <linux/irqdomain.h>
#include <linux/regmap.h>
#define MAX77686_I2C_ADDR_RTC …
#define MAX77620_I2C_ADDR_RTC …
#define MAX77714_I2C_ADDR_RTC …
#define MAX77686_INVALID_I2C_ADDR …
#define MAX77686_INVALID_REG …
#define BCD_EN_SHIFT …
#define BCD_EN_MASK …
#define MODEL24_SHIFT …
#define MODEL24_MASK …
#define RTC_UDR_SHIFT …
#define RTC_UDR_MASK …
#define RTC_RBUDR_SHIFT …
#define RTC_RBUDR_MASK …
#define ALARM_ENABLE_SHIFT …
#define ALARM_ENABLE_MASK …
#define REG_RTC_NONE …
#define MAX77802_ALARM_ENABLE_VALUE …
enum { … };
struct max77686_rtc_driver_data { … };
struct max77686_rtc_info { … };
enum MAX77686_RTC_OP { … };
enum max77686_rtc_reg_offset { … };
static const unsigned int max77686_map[REG_RTC_END] = …;
static const struct regmap_irq max77686_rtc_irqs[] = …;
static const struct regmap_irq_chip max77686_rtc_irq_chip = …;
static const struct regmap_config max77686_rtc_regmap_config = …;
static const struct max77686_rtc_driver_data max77686_drv_data = …;
static const struct regmap_irq_chip max77714_rtc_irq_chip = …;
static const struct max77686_rtc_driver_data max77714_drv_data = …;
static const struct regmap_config max77620_rtc_regmap_config = …;
static const struct max77686_rtc_driver_data max77620_drv_data = …;
static const unsigned int max77802_map[REG_RTC_END] = …;
static const struct regmap_irq_chip max77802_rtc_irq_chip = …;
static const struct max77686_rtc_driver_data max77802_drv_data = …;
static void max77686_rtc_data_to_tm(u8 *data, struct rtc_time *tm,
struct max77686_rtc_info *info)
{ … }
static int max77686_rtc_tm_to_data(struct rtc_time *tm, u8 *data,
struct max77686_rtc_info *info)
{ … }
static int max77686_rtc_update(struct max77686_rtc_info *info,
enum MAX77686_RTC_OP op)
{ … }
static int max77686_rtc_read_time(struct device *dev, struct rtc_time *tm)
{ … }
static int max77686_rtc_set_time(struct device *dev, struct rtc_time *tm)
{ … }
static int max77686_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{ … }
static int max77686_rtc_stop_alarm(struct max77686_rtc_info *info)
{ … }
static int max77686_rtc_start_alarm(struct max77686_rtc_info *info)
{ … }
static int max77686_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{ … }
static int max77686_rtc_alarm_irq_enable(struct device *dev,
unsigned int enabled)
{ … }
static irqreturn_t max77686_rtc_alarm_irq(int irq, void *data)
{ … }
static const struct rtc_class_ops max77686_rtc_ops = …;
static int max77686_rtc_init_reg(struct max77686_rtc_info *info)
{ … }
static int max77686_init_rtc_regmap(struct max77686_rtc_info *info)
{ … }
static int max77686_rtc_probe(struct platform_device *pdev)
{ … }
static void max77686_rtc_remove(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM_SLEEP
static int max77686_rtc_suspend(struct device *dev)
{ … }
static int max77686_rtc_resume(struct device *dev)
{ … }
#endif
static SIMPLE_DEV_PM_OPS(max77686_rtc_pm_ops,
max77686_rtc_suspend, max77686_rtc_resume);
static const struct platform_device_id rtc_id[] = …;
MODULE_DEVICE_TABLE(platform, rtc_id);
static struct platform_driver max77686_rtc_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;