1 /*drivers/rtc/rtc-s35392a.h - driver for s35392a
\r
3 * Copyright (C) 2010 ROCKCHIP, Inc.
\r
5 * This software is licensed under the terms of the GNU General Public
\r
6 * License version 2, as published by the Free Software Foundation, and
\r
7 * may be copied, distributed, and modified under those terms.
\r
9 * This program is distributed in the hope that it will be useful,
\r
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
12 * GNU General Public License for more details.
\r
14 #ifndef RTC_S35392A_H_
\r
15 #define RTC_S35392A_H_
\r
17 #define S35392A_CMD_STATUS1 0x0
\r
18 #define S35392A_CMD_STATUS2 0x1
\r
19 #define S35392A_CMD_TIME1 0x2
\r
20 #define S35392A_CMD_TIME2 0x3
\r
21 #define S35392A_CMD_INT1 0x4
\r
22 #define S35392A_CMD_INT2 0x5
\r
23 #define S35392A_CMD_CHECK 0x6
\r
24 #define S35392A_CMD_FREE 0x7
\r
26 #define S35392A_BYTE_YEAR 0
\r
27 #define S35392A_BYTE_MONTH 1
\r
28 #define S35392A_BYTE_DAY 2
\r
29 #define S35392A_BYTE_WDAY 3
\r
30 #define S35392A_BYTE_HOURS 4
\r
31 #define S35392A_BYTE_MINS 5
\r
32 #define S35392A_BYTE_SECS 6
\r
34 #define S35392A_FLAG_POC 0x01
\r
35 #define S35392A_FLAG_BLD 0x02
\r
36 #define S35392A_FLAG_INT2 0x04
\r
37 #define S35392A_FLAG_INT1 0x08
\r
38 #define S35392A_FLAG_24H 0x40
\r
40 #define S35392A_FLAG_TEST 0x01
\r
41 #define S35392A_FLAG_INT1AE 0x20
\r
42 #define S35392A_FLAG_RESET 0x80
\r
46 //#define S35392_STATUS_INT1 (~(0x3<<5))
\r
47 //#define S35392_STATUS_INT2 (~(0x3<<1))
\r