#define pr_fmt(fmt) …
#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/bcd.h>
#include <linux/regmap.h>
#include <linux/rtc.h>
#include <linux/platform_device.h>
#include <linux/mfd/samsung/core.h>
#include <linux/mfd/samsung/irq.h>
#include <linux/mfd/samsung/rtc.h>
#include <linux/mfd/samsung/s2mps14.h>
#define UDR_READ_RETRY_CNT …
enum { … };
struct s5m_rtc_reg_config { … };
static const struct s5m_rtc_reg_config s5m_rtc_regs = …;
static const struct s5m_rtc_reg_config s2mps13_rtc_regs = …;
static const struct s5m_rtc_reg_config s2mps14_rtc_regs = …;
static const struct s5m_rtc_reg_config s2mps15_rtc_regs = …;
struct s5m_rtc_info { … };
static const struct regmap_config s5m_rtc_regmap_config = …;
static const struct regmap_config s2mps14_rtc_regmap_config = …;
static void s5m8767_data_to_tm(u8 *data, struct rtc_time *tm,
int rtc_24hr_mode)
{ … }
static int s5m8767_tm_to_data(struct rtc_time *tm, u8 *data)
{ … }
static int s5m8767_wait_for_udr_update(struct s5m_rtc_info *info)
{ … }
static int s5m_check_peding_alarm_interrupt(struct s5m_rtc_info *info,
struct rtc_wkalrm *alarm)
{ … }
static int s5m8767_rtc_set_time_reg(struct s5m_rtc_info *info)
{ … }
static int s5m8767_rtc_set_alarm_reg(struct s5m_rtc_info *info)
{ … }
static int s5m_rtc_read_time(struct device *dev, struct rtc_time *tm)
{ … }
static int s5m_rtc_set_time(struct device *dev, struct rtc_time *tm)
{ … }
static int s5m_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{ … }
static int s5m_rtc_stop_alarm(struct s5m_rtc_info *info)
{ … }
static int s5m_rtc_start_alarm(struct s5m_rtc_info *info)
{ … }
static int s5m_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{ … }
static int s5m_rtc_alarm_irq_enable(struct device *dev,
unsigned int enabled)
{ … }
static irqreturn_t s5m_rtc_alarm_irq(int irq, void *data)
{ … }
static const struct rtc_class_ops s5m_rtc_ops = …;
static int s5m8767_rtc_init_reg(struct s5m_rtc_info *info)
{ … }
static int s5m_rtc_probe(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM_SLEEP
static int s5m_rtc_resume(struct device *dev)
{ … }
static int s5m_rtc_suspend(struct device *dev)
{ … }
#endif
static SIMPLE_DEV_PM_OPS(s5m_rtc_pm_ops, s5m_rtc_suspend, s5m_rtc_resume);
static const struct platform_device_id s5m_rtc_id[] = …;
MODULE_DEVICE_TABLE(platform, s5m_rtc_id);
static struct platform_driver s5m_rtc_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;