4 * Copyright (c) 2011 Samsung Electronics Co., Ltd
5 * http://www.samsung.com
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
14 #ifndef __LINUX_MFD_S5M_RTC_H
15 #define __LINUX_MFD_S5M_RTC_H
17 enum s5m87xx_rtc_reg
{
29 S5M87XX_ALARM0_WEEKDAY
,
37 S5M87XX_ALARM1_WEEKDAY
,
45 S5M87XX_WTSR_SMPL_CNTL
,
49 #define RTC_I2C_ADDR (0x0C >> 1)
51 #define HOUR_12 (1 << 7)
52 #define HOUR_AMPM (1 << 6)
53 #define HOUR_PM (1 << 5)
54 #define ALARM0_STATUS (1 << 1)
55 #define ALARM1_STATUS (1 << 2)
56 #define UPDATE_AD (1 << 0)
58 /* RTC Control Register */
59 #define BCD_EN_SHIFT 0
60 #define BCD_EN_MASK (1 << BCD_EN_SHIFT)
61 #define MODEL24_SHIFT 1
62 #define MODEL24_MASK (1 << MODEL24_SHIFT)
63 /* RTC Update Register1 */
64 #define RTC_UDR_SHIFT 0
65 #define RTC_UDR_MASK (1 << RTC_UDR_SHIFT)
66 /* RTC Hour register */
67 #define HOUR_PM_SHIFT 6
68 #define HOUR_PM_MASK (1 << HOUR_PM_SHIFT)
69 /* RTC Alarm Enable */
70 #define ALARM_ENABLE_SHIFT 7
71 #define ALARM_ENABLE_MASK (1 << ALARM_ENABLE_SHIFT)
84 #endif /* __LINUX_MFD_S5M_RTC_H */