Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
rtc.h
Go to the documentation of this file.
1 /* rtc.h
2  *
3  * Copyright (c) 2011 Samsung Electronics Co., Ltd
4  * http://www.samsung.com
5  *
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
8  * Free Software Foundation; either version 2 of the License, or (at your
9  * option) any later version.
10  *
11  */
12 
13 #ifndef __LINUX_MFD_SEC_RTC_H
14 #define __LINUX_MFD_SEC_RTC_H
15 
46 };
47 
48 #define RTC_I2C_ADDR (0x0C >> 1)
49 
50 #define HOUR_12 (1 << 7)
51 #define HOUR_AMPM (1 << 6)
52 #define HOUR_PM (1 << 5)
53 #define ALARM0_STATUS (1 << 1)
54 #define ALARM1_STATUS (1 << 2)
55 #define UPDATE_AD (1 << 0)
56 
57 /* RTC Control Register */
58 #define BCD_EN_SHIFT 0
59 #define BCD_EN_MASK (1 << BCD_EN_SHIFT)
60 #define MODEL24_SHIFT 1
61 #define MODEL24_MASK (1 << MODEL24_SHIFT)
62 /* RTC Update Register1 */
63 #define RTC_UDR_SHIFT 0
64 #define RTC_UDR_MASK (1 << RTC_UDR_SHIFT)
65 /* RTC Hour register */
66 #define HOUR_PM_SHIFT 6
67 #define HOUR_PM_MASK (1 << HOUR_PM_SHIFT)
68 /* RTC Alarm Enable */
69 #define ALARM_ENABLE_SHIFT 7
70 #define ALARM_ENABLE_MASK (1 << ALARM_ENABLE_SHIFT)
71 
72 enum {
73  RTC_SEC = 0,
81 };
82 
83 #endif /* __LINUX_MFD_SEC_RTC_H */