#include <linux/bcd.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/ioport.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinconf-generic.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/property.h>
#include <linux/rtc.h>
#include <linux/rtc/rtc-omap.h>
#define OMAP_RTC_SECONDS_REG …
#define OMAP_RTC_MINUTES_REG …
#define OMAP_RTC_HOURS_REG …
#define OMAP_RTC_DAYS_REG …
#define OMAP_RTC_MONTHS_REG …
#define OMAP_RTC_YEARS_REG …
#define OMAP_RTC_WEEKS_REG …
#define OMAP_RTC_ALARM_SECONDS_REG …
#define OMAP_RTC_ALARM_MINUTES_REG …
#define OMAP_RTC_ALARM_HOURS_REG …
#define OMAP_RTC_ALARM_DAYS_REG …
#define OMAP_RTC_ALARM_MONTHS_REG …
#define OMAP_RTC_ALARM_YEARS_REG …
#define OMAP_RTC_CTRL_REG …
#define OMAP_RTC_STATUS_REG …
#define OMAP_RTC_INTERRUPTS_REG …
#define OMAP_RTC_COMP_LSB_REG …
#define OMAP_RTC_COMP_MSB_REG …
#define OMAP_RTC_OSC_REG …
#define OMAP_RTC_SCRATCH0_REG …
#define OMAP_RTC_SCRATCH1_REG …
#define OMAP_RTC_SCRATCH2_REG …
#define OMAP_RTC_KICK0_REG …
#define OMAP_RTC_KICK1_REG …
#define OMAP_RTC_IRQWAKEEN …
#define OMAP_RTC_ALARM2_SECONDS_REG …
#define OMAP_RTC_ALARM2_MINUTES_REG …
#define OMAP_RTC_ALARM2_HOURS_REG …
#define OMAP_RTC_ALARM2_DAYS_REG …
#define OMAP_RTC_ALARM2_MONTHS_REG …
#define OMAP_RTC_ALARM2_YEARS_REG …
#define OMAP_RTC_PMIC_REG …
#define OMAP_RTC_CTRL_SPLIT …
#define OMAP_RTC_CTRL_DISABLE …
#define OMAP_RTC_CTRL_SET_32_COUNTER …
#define OMAP_RTC_CTRL_TEST …
#define OMAP_RTC_CTRL_MODE_12_24 …
#define OMAP_RTC_CTRL_AUTO_COMP …
#define OMAP_RTC_CTRL_ROUND_30S …
#define OMAP_RTC_CTRL_STOP …
#define OMAP_RTC_STATUS_POWER_UP …
#define OMAP_RTC_STATUS_ALARM2 …
#define OMAP_RTC_STATUS_ALARM …
#define OMAP_RTC_STATUS_1D_EVENT …
#define OMAP_RTC_STATUS_1H_EVENT …
#define OMAP_RTC_STATUS_1M_EVENT …
#define OMAP_RTC_STATUS_1S_EVENT …
#define OMAP_RTC_STATUS_RUN …
#define OMAP_RTC_STATUS_BUSY …
#define OMAP_RTC_INTERRUPTS_IT_ALARM2 …
#define OMAP_RTC_INTERRUPTS_IT_ALARM …
#define OMAP_RTC_INTERRUPTS_IT_TIMER …
#define OMAP_RTC_OSC_32KCLK_EN …
#define OMAP_RTC_OSC_SEL_32KCLK_SRC …
#define OMAP_RTC_OSC_OSC32K_GZ_DISABLE …
#define OMAP_RTC_IRQWAKEEN_ALARM_WAKEEN …
#define OMAP_RTC_PMIC_POWER_EN_EN …
#define OMAP_RTC_PMIC_EXT_WKUP_EN(x) …
#define OMAP_RTC_PMIC_EXT_WKUP_POL(x) …
#define KICK0_VALUE …
#define KICK1_VALUE …
struct omap_rtc;
struct omap_rtc_device_type { … };
struct omap_rtc { … };
static inline u8 rtc_read(struct omap_rtc *rtc, unsigned int reg)
{ … }
static inline u32 rtc_readl(struct omap_rtc *rtc, unsigned int reg)
{ … }
static inline void rtc_write(struct omap_rtc *rtc, unsigned int reg, u8 val)
{ … }
static inline void rtc_writel(struct omap_rtc *rtc, unsigned int reg, u32 val)
{ … }
static void am3352_rtc_unlock(struct omap_rtc *rtc)
{ … }
static void am3352_rtc_lock(struct omap_rtc *rtc)
{ … }
static void default_rtc_unlock(struct omap_rtc *rtc)
{ … }
static void default_rtc_lock(struct omap_rtc *rtc)
{ … }
static void rtc_wait_not_busy(struct omap_rtc *rtc)
{ … }
static irqreturn_t rtc_irq(int irq, void *dev_id)
{ … }
static int omap_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled)
{ … }
static void tm2bcd(struct rtc_time *tm)
{ … }
static void bcd2tm(struct rtc_time *tm)
{ … }
static void omap_rtc_read_time_raw(struct omap_rtc *rtc, struct rtc_time *tm)
{ … }
static int omap_rtc_read_time(struct device *dev, struct rtc_time *tm)
{ … }
static int omap_rtc_set_time(struct device *dev, struct rtc_time *tm)
{ … }
static int omap_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm)
{ … }
static int omap_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm)
{ … }
static struct omap_rtc *omap_rtc_power_off_rtc;
int omap_rtc_power_off_program(struct device *dev)
{ … }
EXPORT_SYMBOL(…);
static void omap_rtc_power_off(void)
{ … }
static const struct rtc_class_ops omap_rtc_ops = …;
static const struct omap_rtc_device_type omap_rtc_default_type = …;
static const struct omap_rtc_device_type omap_rtc_am3352_type = …;
static const struct omap_rtc_device_type omap_rtc_da830_type = …;
static const struct platform_device_id omap_rtc_id_table[] = …;
MODULE_DEVICE_TABLE(platform, omap_rtc_id_table);
static const struct of_device_id omap_rtc_of_match[] = …;
MODULE_DEVICE_TABLE(of, omap_rtc_of_match);
static const struct pinctrl_pin_desc rtc_pins_desc[] = …;
static int rtc_pinctrl_get_groups_count(struct pinctrl_dev *pctldev)
{ … }
static const char *rtc_pinctrl_get_group_name(struct pinctrl_dev *pctldev,
unsigned int group)
{ … }
static const struct pinctrl_ops rtc_pinctrl_ops = …;
#define PIN_CONFIG_ACTIVE_HIGH …
static const struct pinconf_generic_params rtc_params[] = …;
#ifdef CONFIG_DEBUG_FS
static const struct pin_config_item rtc_conf_items[ARRAY_SIZE(rtc_params)] = …;
#endif
static int rtc_pinconf_get(struct pinctrl_dev *pctldev,
unsigned int pin, unsigned long *config)
{ … }
static int rtc_pinconf_set(struct pinctrl_dev *pctldev,
unsigned int pin, unsigned long *configs,
unsigned int num_configs)
{ … }
static const struct pinconf_ops rtc_pinconf_ops = …;
static struct pinctrl_desc rtc_pinctrl_desc = …;
static int omap_rtc_scratch_read(void *priv, unsigned int offset, void *_val,
size_t bytes)
{ … }
static int omap_rtc_scratch_write(void *priv, unsigned int offset, void *_val,
size_t bytes)
{ … }
static struct nvmem_config omap_rtc_nvmem_config = …;
static int omap_rtc_probe(struct platform_device *pdev)
{ … }
static void omap_rtc_remove(struct platform_device *pdev)
{ … }
static int __maybe_unused omap_rtc_suspend(struct device *dev)
{ … }
static int __maybe_unused omap_rtc_resume(struct device *dev)
{ … }
static int __maybe_unused omap_rtc_runtime_suspend(struct device *dev)
{ … }
static const struct dev_pm_ops omap_rtc_pm_ops = …;
static void omap_rtc_shutdown(struct platform_device *pdev)
{ … }
static struct platform_driver omap_rtc_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;