diff options
Diffstat (limited to 'include/linux/mfd/samsung/rtc.h')
-rw-r--r-- | include/linux/mfd/samsung/rtc.h | 57 |
1 files changed, 51 insertions, 6 deletions
diff --git a/include/linux/mfd/samsung/rtc.h b/include/linux/mfd/samsung/rtc.h index 94b7cd6d8891..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 | ||
@@ -43,6 +48,39 @@ enum sec_rtc_reg { | |||
43 | SEC_RTC_STATUS, | 48 | SEC_RTC_STATUS, |
44 | SEC_WTSR_SMPL_CNTL, | 49 | SEC_WTSR_SMPL_CNTL, |
45 | SEC_RTC_UDR_CON, | 50 | SEC_RTC_UDR_CON, |
51 | |||
52 | SEC_RTC_REG_MAX, | ||
53 | }; | ||
54 | |||
55 | enum 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, | ||
46 | }; | 84 | }; |
47 | 85 | ||
48 | #define RTC_I2C_ADDR (0x0C >> 1) | 86 | #define RTC_I2C_ADDR (0x0C >> 1) |
@@ -54,6 +92,9 @@ enum sec_rtc_reg { | |||
54 | #define ALARM1_STATUS (1 << 2) | 92 | #define ALARM1_STATUS (1 << 2) |
55 | #define UPDATE_AD (1 << 0) | 93 | #define UPDATE_AD (1 << 0) |
56 | 94 | ||
95 | #define S2MPS_ALARM0_STATUS (1 << 2) | ||
96 | #define S2MPS_ALARM1_STATUS (1 << 1) | ||
97 | |||
57 | /* RTC Control Register */ | 98 | /* RTC Control Register */ |
58 | #define BCD_EN_SHIFT 0 | 99 | #define BCD_EN_SHIFT 0 |
59 | #define BCD_EN_MASK (1 << BCD_EN_SHIFT) | 100 | #define BCD_EN_MASK (1 << BCD_EN_SHIFT) |
@@ -62,6 +103,10 @@ enum sec_rtc_reg { | |||
62 | /* RTC Update Register1 */ | 103 | /* RTC Update Register1 */ |
63 | #define RTC_UDR_SHIFT 0 | 104 | #define RTC_UDR_SHIFT 0 |
64 | #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) | ||
65 | #define RTC_TCON_SHIFT 1 | 110 | #define RTC_TCON_SHIFT 1 |
66 | #define RTC_TCON_MASK (1 << RTC_TCON_SHIFT) | 111 | #define RTC_TCON_MASK (1 << RTC_TCON_SHIFT) |
67 | #define RTC_TIME_EN_SHIFT 3 | 112 | #define RTC_TIME_EN_SHIFT 3 |