#include <linux/module.h>
#include <linux/rtc.h>
#include <linux/i2c.h>
#include <linux/bcd.h>
#include <linux/of.h>
#include <linux/regmap.h>
#include <linux/interrupt.h>
#define DRV_NAME …
#define ABB5ZES3_REG_CTRL1 …
#define ABB5ZES3_REG_CTRL1_CIE …
#define ABB5ZES3_REG_CTRL1_AIE …
#define ABB5ZES3_REG_CTRL1_SIE …
#define ABB5ZES3_REG_CTRL1_PM …
#define ABB5ZES3_REG_CTRL1_SR …
#define ABB5ZES3_REG_CTRL1_STOP …
#define ABB5ZES3_REG_CTRL1_CAP …
#define ABB5ZES3_REG_CTRL2 …
#define ABB5ZES3_REG_CTRL2_CTBIE …
#define ABB5ZES3_REG_CTRL2_CTAIE …
#define ABB5ZES3_REG_CTRL2_WTAIE …
#define ABB5ZES3_REG_CTRL2_AF …
#define ABB5ZES3_REG_CTRL2_SF …
#define ABB5ZES3_REG_CTRL2_CTBF …
#define ABB5ZES3_REG_CTRL2_CTAF …
#define ABB5ZES3_REG_CTRL2_WTAF …
#define ABB5ZES3_REG_CTRL3 …
#define ABB5ZES3_REG_CTRL3_PM2 …
#define ABB5ZES3_REG_CTRL3_PM1 …
#define ABB5ZES3_REG_CTRL3_PM0 …
#define ABB5ZES3_REG_CTRL3_BSF …
#define ABB5ZES3_REG_CTRL3_BLF …
#define ABB5ZES3_REG_CTRL3_BSIE …
#define ABB5ZES3_REG_CTRL3_BLIE …
#define ABB5ZES3_CTRL_SEC_LEN …
#define ABB5ZES3_REG_RTC_SC …
#define ABB5ZES3_REG_RTC_SC_OSC …
#define ABB5ZES3_REG_RTC_MN …
#define ABB5ZES3_REG_RTC_HR …
#define ABB5ZES3_REG_RTC_HR_PM …
#define ABB5ZES3_REG_RTC_DT …
#define ABB5ZES3_REG_RTC_DW …
#define ABB5ZES3_REG_RTC_MO …
#define ABB5ZES3_REG_RTC_YR …
#define ABB5ZES3_RTC_SEC_LEN …
#define ABB5ZES3_REG_ALRM_MN …
#define ABB5ZES3_REG_ALRM_MN_AE …
#define ABB5ZES3_REG_ALRM_HR …
#define ABB5ZES3_REG_ALRM_HR_AE …
#define ABB5ZES3_REG_ALRM_DT …
#define ABB5ZES3_REG_ALRM_DT_AE …
#define ABB5ZES3_REG_ALRM_DW …
#define ABB5ZES3_REG_ALRM_DW_AE …
#define ABB5ZES3_ALRM_SEC_LEN …
#define ABB5ZES3_REG_FREQ_OF …
#define ABB5ZES3_REG_FREQ_OF_MODE …
#define ABB5ZES3_REG_TIM_CLK …
#define ABB5ZES3_REG_TIM_CLK_TAM …
#define ABB5ZES3_REG_TIM_CLK_TBM …
#define ABB5ZES3_REG_TIM_CLK_COF2 …
#define ABB5ZES3_REG_TIM_CLK_COF1 …
#define ABB5ZES3_REG_TIM_CLK_COF0 …
#define ABB5ZES3_REG_TIM_CLK_TAC1 …
#define ABB5ZES3_REG_TIM_CLK_TAC0 …
#define ABB5ZES3_REG_TIM_CLK_TBC …
#define ABB5ZES3_REG_TIMA_CLK …
#define ABB5ZES3_REG_TIMA_CLK_TAQ2 …
#define ABB5ZES3_REG_TIMA_CLK_TAQ1 …
#define ABB5ZES3_REG_TIMA_CLK_TAQ0 …
#define ABB5ZES3_REG_TIMA …
#define ABB5ZES3_TIMA_SEC_LEN …
#define ABB5ZES3_REG_TIMB_CLK …
#define ABB5ZES3_REG_TIMB_CLK_TBW2 …
#define ABB5ZES3_REG_TIMB_CLK_TBW1 …
#define ABB5ZES3_REG_TIMB_CLK_TBW0 …
#define ABB5ZES3_REG_TIMB_CLK_TAQ2 …
#define ABB5ZES3_REG_TIMB_CLK_TAQ1 …
#define ABB5ZES3_REG_TIMB_CLK_TAQ0 …
#define ABB5ZES3_REG_TIMB …
#define ABB5ZES3_TIMB_SEC_LEN …
#define ABB5ZES3_MEM_MAP_LEN …
struct abb5zes3_rtc_data { … };
static int abb5zes3_i2c_validate_chip(struct regmap *regmap)
{ … }
static int _abb5zes3_rtc_clear_alarm(struct device *dev)
{ … }
static int _abb5zes3_rtc_update_alarm(struct device *dev, bool enable)
{ … }
static int _abb5zes3_rtc_update_timer(struct device *dev, bool enable)
{ … }
static int _abb5zes3_rtc_read_time(struct device *dev, struct rtc_time *tm)
{ … }
static int abb5zes3_rtc_set_time(struct device *dev, struct rtc_time *tm)
{ … }
static inline void sec_to_timer_a(u8 secs, u8 *taq, u8 *timer_a)
{ … }
static inline int sec_from_timer_a(u8 *secs, u8 taq, u8 timer_a)
{ … }
static int _abb5zes3_rtc_read_timer(struct device *dev,
struct rtc_wkalrm *alarm)
{ … }
static int _abb5zes3_rtc_read_alarm(struct device *dev,
struct rtc_wkalrm *alarm)
{ … }
static int abb5zes3_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
{ … }
static int _abb5zes3_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alarm)
{ … }
static int _abb5zes3_rtc_set_timer(struct device *dev, struct rtc_wkalrm *alarm,
u8 secs)
{ … }
static int abb5zes3_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alarm)
{ … }
static inline int _abb5zes3_rtc_battery_low_irq_enable(struct regmap *regmap,
bool enable)
{ … }
static int abb5zes3_rtc_check_setup(struct device *dev)
{ … }
static int abb5zes3_rtc_alarm_irq_enable(struct device *dev,
unsigned int enable)
{ … }
static irqreturn_t _abb5zes3_rtc_interrupt(int irq, void *data)
{ … }
static const struct rtc_class_ops rtc_ops = …;
static const struct regmap_config abb5zes3_rtc_regmap_config = …;
static int abb5zes3_probe(struct i2c_client *client)
{ … }
#ifdef CONFIG_PM_SLEEP
static int abb5zes3_rtc_suspend(struct device *dev)
{ … }
static int abb5zes3_rtc_resume(struct device *dev)
{ … }
#endif
static SIMPLE_DEV_PM_OPS(abb5zes3_rtc_pm_ops, abb5zes3_rtc_suspend,
abb5zes3_rtc_resume);
#ifdef CONFIG_OF
static const struct of_device_id abb5zes3_dt_match[] = …;
MODULE_DEVICE_TABLE(of, abb5zes3_dt_match);
#endif
static const struct i2c_device_id abb5zes3_id[] = …;
MODULE_DEVICE_TABLE(i2c, abb5zes3_id);
static struct i2c_driver abb5zes3_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;