linux/include/linux/mfd/mt6397/rtc.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (C) 2014-2019 MediaTek Inc.
 *
 * Author: Tianping.Fang <[email protected]>
 *        Sean Wang <[email protected]>
 */

#ifndef _LINUX_MFD_MT6397_RTC_H_
#define _LINUX_MFD_MT6397_RTC_H_

#include <linux/jiffies.h>
#include <linux/mutex.h>
#include <linux/regmap.h>
#include <linux/rtc.h>

#define RTC_BBPU
#define RTC_BBPU_CBUSY
#define RTC_BBPU_KEY

#define RTC_WRTGR_MT6358
#define RTC_WRTGR_MT6397
#define RTC_WRTGR_MT6323

#define RTC_IRQ_STA
#define RTC_IRQ_STA_AL
#define RTC_IRQ_STA_LP

#define RTC_IRQ_EN
#define RTC_IRQ_EN_AL
#define RTC_IRQ_EN_ONESHOT
#define RTC_IRQ_EN_LP
#define RTC_IRQ_EN_ONESHOT_AL

#define RTC_AL_MASK
#define RTC_AL_MASK_DOW

#define RTC_TC_SEC
#define RTC_TC_MTH_MASK
/* Min, Hour, Dom... register offset to RTC_TC_SEC */
#define RTC_OFFSET_SEC
#define RTC_OFFSET_MIN
#define RTC_OFFSET_HOUR
#define RTC_OFFSET_DOM
#define RTC_OFFSET_DOW
#define RTC_OFFSET_MTH
#define RTC_OFFSET_YEAR
#define RTC_OFFSET_COUNT

#define RTC_AL_SEC

#define RTC_AL_SEC_MASK
#define RTC_AL_MIN_MASK
#define RTC_AL_HOU_MASK
#define RTC_AL_DOM_MASK
#define RTC_AL_DOW_MASK
#define RTC_AL_MTH_MASK
#define RTC_AL_YEA_MASK

#define RTC_PDN2
#define RTC_PDN2_PWRON_ALARM

#define RTC_MIN_YEAR
#define RTC_BASE_YEAR
#define RTC_NUM_YEARS
#define RTC_MIN_YEAR_OFFSET

#define MTK_RTC_POLL_DELAY_US
#define MTK_RTC_POLL_TIMEOUT

struct mtk_rtc_data {};

struct mt6397_rtc {};

#endif /* _LINUX_MFD_MT6397_RTC_H_ */