mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
rtc: s5m-rtc: add real-time clock driver for s5m8767
Add real-time clock driver for s5m8767. Signed-off-by: Sangbeom Kim <sbkim73@samsung.com> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Todd Broch <tbroch@chromium.org> Cc: Mark Brown <broonie@kernel.org> Acked-by: Lee Jones <lee.jones@linaro.org> [mfd parts] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
5e0d12142e
commit
5bccae6ec4
@@ -497,6 +497,16 @@ config RTC_DRV_RV3029C2
|
||||
This driver can also be built as a module. If so, the module
|
||||
will be called rtc-rv3029c2.
|
||||
|
||||
config RTC_DRV_S5M
|
||||
tristate "Samsung S5M series"
|
||||
depends on MFD_SEC_CORE
|
||||
help
|
||||
If you say yes here you will get support for the
|
||||
RTC of Samsung S5M PMIC series.
|
||||
|
||||
This driver can also be built as a module. If so, the module
|
||||
will be called rtc-s5m.
|
||||
|
||||
endif # I2C
|
||||
|
||||
comment "SPI RTC drivers"
|
||||
|
||||
@@ -107,6 +107,7 @@ obj-$(CONFIG_RTC_DRV_RX8025) += rtc-rx8025.o
|
||||
obj-$(CONFIG_RTC_DRV_RX8581) += rtc-rx8581.o
|
||||
obj-$(CONFIG_RTC_DRV_S35390A) += rtc-s35390a.o
|
||||
obj-$(CONFIG_RTC_DRV_S3C) += rtc-s3c.o
|
||||
obj-$(CONFIG_RTC_DRV_S5M) += rtc-s5m.o
|
||||
obj-$(CONFIG_RTC_DRV_SA1100) += rtc-sa1100.o
|
||||
obj-$(CONFIG_RTC_DRV_SH) += rtc-sh.o
|
||||
obj-$(CONFIG_RTC_DRV_SNVS) += rtc-snvs.o
|
||||
|
||||
635
drivers/rtc/rtc-s5m.c
Normal file
635
drivers/rtc/rtc-s5m.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -51,6 +51,7 @@ struct sec_pmic_dev {
|
||||
int ono;
|
||||
int type;
|
||||
bool wakeup;
|
||||
bool wtsr_smpl;
|
||||
};
|
||||
|
||||
int sec_irq_init(struct sec_pmic_dev *sec_pmic);
|
||||
|
||||
@@ -62,6 +62,11 @@ enum sec_rtc_reg {
|
||||
/* RTC Update Register1 */
|
||||
#define RTC_UDR_SHIFT 0
|
||||
#define RTC_UDR_MASK (1 << RTC_UDR_SHIFT)
|
||||
#define RTC_TCON_SHIFT 1
|
||||
#define RTC_TCON_MASK (1 << RTC_TCON_SHIFT)
|
||||
#define RTC_TIME_EN_SHIFT 3
|
||||
#define RTC_TIME_EN_MASK (1 << RTC_TIME_EN_SHIFT)
|
||||
|
||||
/* RTC Hour register */
|
||||
#define HOUR_PM_SHIFT 6
|
||||
#define HOUR_PM_MASK (1 << HOUR_PM_SHIFT)
|
||||
@@ -69,6 +74,12 @@ enum sec_rtc_reg {
|
||||
#define ALARM_ENABLE_SHIFT 7
|
||||
#define ALARM_ENABLE_MASK (1 << ALARM_ENABLE_SHIFT)
|
||||
|
||||
#define SMPL_ENABLE_SHIFT 7
|
||||
#define SMPL_ENABLE_MASK (1 << SMPL_ENABLE_SHIFT)
|
||||
|
||||
#define WTSR_ENABLE_SHIFT 6
|
||||
#define WTSR_ENABLE_MASK (1 << WTSR_ENABLE_SHIFT)
|
||||
|
||||
enum {
|
||||
RTC_SEC = 0,
|
||||
RTC_MIN,
|
||||
|
||||
Reference in New Issue
Block a user