Merge remote-tracking branch 'remotes/aosp/android-3.0' into develop-3.0
[firefly-linux-kernel-4.4.55.git] / drivers / rtc / rtc-HYM8563.h
1 /*drivers/rtc/rtc-HYM8563.h - driver for HYM8563
2  *
3  * Copyright (C) 2010 ROCKCHIP, Inc.
4  *
5  * This software is licensed under the terms of the GNU General Public
6  * License version 2, as published by the Free Software Foundation, and
7  * may be copied, distributed, and modified under those terms.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  */
14  
15 #ifndef _DRIVERS_HYM8563_H
16 #define _DRIVERS_HYM8563_H
17  
18 #define   RTC_CTL1              0x00
19 #define   RTC_CTL2              0x01
20 #define   RTC_SEC               0x02
21 #define   RTC_MIN               0x03
22 #define   RTC_HOUR              0x04
23 #define   RTC_DAY               0x05
24 #define   RTC_WEEK              0x06
25 #define   RTC_MON               0x07
26 #define   RTC_YEAR              0x08
27 #define   RTC_A_MIN     0x09
28 #define   RTC_A_HOUR    0x0A
29 #define   RTC_A_DAY     0x0B
30 #define   RTC_A_WEEK    0x0C
31 #define   RTC_CLKOUT    0x0D
32 #define   RTC_T_CTL     0x0E
33 #define   RTC_T_COUNT   0x0F
34 #define   CENTURY       0x80
35 #define   TI            0x10
36 #define   AF            0x08
37 #define   TF            0x04
38 #define   AIE           0x02
39 #define   TIE           0x01
40 #define   FE            0x80
41 #define   TE            0x80
42 #define   FD1           0x02
43 #define   FD0           0x01
44 #define   TD1           0x02
45 #define   TD0           0x01
46 #define   VL            0x80
47
48 #define HYM8563_REG_LEN         0x10
49 #define HYM8563_RTC_SECTION_LEN 0x07
50
51 struct hym8563_platform_data {
52     unsigned int speed;
53     unsigned int mode;
54     unsigned int reg_byte_cnt;
55 };
56
57 #endif  /*_DRIVERS_HYM8563_H*/