GNU Linux-libre 4.14.266-gnu1
[releases.git] / drivers / staging / rtl8723bs / hal / Hal8723BPwrSeq.c
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of version 2 of the GNU General Public License as
7  * published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  ******************************************************************************/
15
16 /*
17 *
18 This file includes all kinds of Power Action event for RTL8723B
19 and corresponding hardware configurtions which are released from HW SD.
20
21 Major Change History:
22         When       Who               What
23         ---------- ---------------   -------------------------------
24         2011-08-08 Roger            Create.
25
26 */
27
28 #include "Hal8723BPwrSeq.h"
29
30 /* drivers should parse below arrays and do the corresponding actions */
31 /* 3 Power on  Array */
32 WLAN_PWR_CFG rtl8723B_power_on_flow[
33         RTL8723B_TRANS_CARDEMU_TO_ACT_STEPS+
34         RTL8723B_TRANS_END_STEPS
35 ] = {
36         RTL8723B_TRANS_CARDEMU_TO_ACT
37         RTL8723B_TRANS_END
38 };
39
40 /* 3Radio off GPIO Array */
41 WLAN_PWR_CFG rtl8723B_radio_off_flow[
42         RTL8723B_TRANS_ACT_TO_CARDEMU_STEPS+
43         RTL8723B_TRANS_END_STEPS
44 ] = {
45         RTL8723B_TRANS_ACT_TO_CARDEMU
46         RTL8723B_TRANS_END
47 };
48
49 /* 3Card Disable Array */
50 WLAN_PWR_CFG rtl8723B_card_disable_flow[
51         RTL8723B_TRANS_ACT_TO_CARDEMU_STEPS+
52         RTL8723B_TRANS_CARDEMU_TO_PDN_STEPS+
53         RTL8723B_TRANS_END_STEPS
54 ] = {
55         RTL8723B_TRANS_ACT_TO_CARDEMU
56         RTL8723B_TRANS_CARDEMU_TO_CARDDIS
57         RTL8723B_TRANS_END
58 };
59
60 /* 3 Card Enable Array */
61 WLAN_PWR_CFG rtl8723B_card_enable_flow[
62         RTL8723B_TRANS_ACT_TO_CARDEMU_STEPS+
63         RTL8723B_TRANS_CARDEMU_TO_PDN_STEPS+
64         RTL8723B_TRANS_END_STEPS
65 ] = {
66         RTL8723B_TRANS_CARDDIS_TO_CARDEMU
67         RTL8723B_TRANS_CARDEMU_TO_ACT
68         RTL8723B_TRANS_END
69 };
70
71 /* 3Suspend Array */
72 WLAN_PWR_CFG rtl8723B_suspend_flow[
73         RTL8723B_TRANS_ACT_TO_CARDEMU_STEPS+
74         RTL8723B_TRANS_CARDEMU_TO_SUS_STEPS+
75         RTL8723B_TRANS_END_STEPS
76 ] = {
77         RTL8723B_TRANS_ACT_TO_CARDEMU
78         RTL8723B_TRANS_CARDEMU_TO_SUS
79         RTL8723B_TRANS_END
80 };
81
82 /* 3 Resume Array */
83 WLAN_PWR_CFG rtl8723B_resume_flow[
84         RTL8723B_TRANS_ACT_TO_CARDEMU_STEPS+
85         RTL8723B_TRANS_CARDEMU_TO_SUS_STEPS+
86         RTL8723B_TRANS_END_STEPS
87 ] = {
88         RTL8723B_TRANS_SUS_TO_CARDEMU
89         RTL8723B_TRANS_CARDEMU_TO_ACT
90         RTL8723B_TRANS_END
91 };
92
93 /* 3HWPDN Array */
94 WLAN_PWR_CFG rtl8723B_hwpdn_flow[
95         RTL8723B_TRANS_ACT_TO_CARDEMU_STEPS+
96         RTL8723B_TRANS_CARDEMU_TO_PDN_STEPS+
97         RTL8723B_TRANS_END_STEPS
98 ] = {
99         RTL8723B_TRANS_ACT_TO_CARDEMU
100         RTL8723B_TRANS_CARDEMU_TO_PDN
101         RTL8723B_TRANS_END
102 };
103
104 /* 3 Enter LPS */
105 WLAN_PWR_CFG rtl8723B_enter_lps_flow[
106         RTL8723B_TRANS_ACT_TO_LPS_STEPS+RTL8723B_TRANS_END_STEPS
107 ] = {
108         /* FW behavior */
109         RTL8723B_TRANS_ACT_TO_LPS
110         RTL8723B_TRANS_END
111 };
112
113 /* 3 Leave LPS */
114 WLAN_PWR_CFG rtl8723B_leave_lps_flow[
115         RTL8723B_TRANS_LPS_TO_ACT_STEPS+RTL8723B_TRANS_END_STEPS
116 ] = {
117         /* FW behavior */
118         RTL8723B_TRANS_LPS_TO_ACT
119         RTL8723B_TRANS_END
120 };
121
122 /* 3 Enter SW LPS */
123 WLAN_PWR_CFG rtl8723B_enter_swlps_flow[
124         RTL8723B_TRANS_ACT_TO_SWLPS_STEPS+RTL8723B_TRANS_END_STEPS
125 ] = {
126         /* SW behavior */
127         RTL8723B_TRANS_ACT_TO_SWLPS
128         RTL8723B_TRANS_END
129 };
130
131 /* 3 Leave SW LPS */
132 WLAN_PWR_CFG rtl8723B_leave_swlps_flow[
133         RTL8723B_TRANS_SWLPS_TO_ACT_STEPS+RTL8723B_TRANS_END_STEPS
134 ] = {
135         /* SW behavior */
136         RTL8723B_TRANS_SWLPS_TO_ACT
137         RTL8723B_TRANS_END
138 };