aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd/samsung/rtc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mfd/samsung/rtc.h')
-rw-r--r--include/linux/mfd/samsung/rtc.h55
1 files changed, 49 insertions, 6 deletions
diff --git a/include/linux/mfd/samsung/rtc.h b/include/linux/mfd/samsung/rtc.h
index 4627f59ebd84..3e02b768d537 100644
--- a/include/linux/mfd/samsung/rtc.h
+++ b/include/linux/mfd/samsung/rtc.h
@@ -1,12 +1,17 @@
1/* rtc.h 1/* rtc.h
2 * 2 *
3 * Copyright (c) 2011 Samsung Electronics Co., Ltd 3 * Copyright (c) 2011-2014 Samsung Electronics Co., Ltd
4 * http://www.samsung.com 4 * http://www.samsung.com
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the 7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your 8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. 9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
10 * 15 *
11 */ 16 */
12 17
@@ -47,6 +52,37 @@ enum sec_rtc_reg {
47 SEC_RTC_REG_MAX, 52 SEC_RTC_REG_MAX,
48}; 53};
49 54
55enum s2mps_rtc_reg {
56 S2MPS_RTC_CTRL,
57 S2MPS_WTSR_SMPL_CNTL,
58 S2MPS_RTC_UDR_CON,
59 S2MPS_RSVD,
60 S2MPS_RTC_SEC,
61 S2MPS_RTC_MIN,
62 S2MPS_RTC_HOUR,
63 S2MPS_RTC_WEEKDAY,
64 S2MPS_RTC_DATE,
65 S2MPS_RTC_MONTH,
66 S2MPS_RTC_YEAR,
67 S2MPS_ALARM0_SEC,
68 S2MPS_ALARM0_MIN,
69 S2MPS_ALARM0_HOUR,
70 S2MPS_ALARM0_WEEKDAY,
71 S2MPS_ALARM0_DATE,
72 S2MPS_ALARM0_MONTH,
73 S2MPS_ALARM0_YEAR,
74 S2MPS_ALARM1_SEC,
75 S2MPS_ALARM1_MIN,
76 S2MPS_ALARM1_HOUR,
77 S2MPS_ALARM1_WEEKDAY,
78 S2MPS_ALARM1_DATE,
79 S2MPS_ALARM1_MONTH,
80 S2MPS_ALARM1_YEAR,
81 S2MPS_OFFSRC,
82
83 S2MPS_RTC_REG_MAX,
84};
85
50#define RTC_I2C_ADDR (0x0C >> 1) 86#define RTC_I2C_ADDR (0x0C >> 1)
51 87
52#define HOUR_12 (1 << 7) 88#define HOUR_12 (1 << 7)
@@ -56,6 +92,9 @@ enum sec_rtc_reg {
56#define ALARM1_STATUS (1 << 2) 92#define ALARM1_STATUS (1 << 2)
57#define UPDATE_AD (1 << 0) 93#define UPDATE_AD (1 << 0)
58 94
95#define S2MPS_ALARM0_STATUS (1 << 2)
96#define S2MPS_ALARM1_STATUS (1 << 1)
97
59/* RTC Control Register */ 98/* RTC Control Register */
60#define BCD_EN_SHIFT 0 99#define BCD_EN_SHIFT 0
61#define BCD_EN_MASK (1 << BCD_EN_SHIFT) 100#define BCD_EN_MASK (1 << BCD_EN_SHIFT)
@@ -64,6 +103,10 @@ enum sec_rtc_reg {
64/* RTC Update Register1 */ 103/* RTC Update Register1 */
65#define RTC_UDR_SHIFT 0 104#define RTC_UDR_SHIFT 0
66#define RTC_UDR_MASK (1 << RTC_UDR_SHIFT) 105#define RTC_UDR_MASK (1 << RTC_UDR_SHIFT)
106#define S2MPS_RTC_WUDR_SHIFT 4
107#define S2MPS_RTC_WUDR_MASK (1 << S2MPS_RTC_WUDR_SHIFT)
108#define S2MPS_RTC_RUDR_SHIFT 0
109#define S2MPS_RTC_RUDR_MASK (1 << S2MPS_RTC_RUDR_SHIFT)
67#define RTC_TCON_SHIFT 1 110#define RTC_TCON_SHIFT 1
68#define RTC_TCON_MASK (1 << RTC_TCON_SHIFT) 111#define RTC_TCON_MASK (1 << RTC_TCON_SHIFT)
69#define RTC_TIME_EN_SHIFT 3 112#define RTC_TIME_EN_SHIFT 3