xref: /linux/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/pwrseq.c (revision bd628c1bed7902ec1f24ba0fe70758949146abbe)
1 /******************************************************************************
2  *
3  * Copyright(c) 2009-2012  Realtek Corporation.
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  * The full GNU General Public License is included in this distribution in the
15  * file called LICENSE.
16  *
17  * Contact Information:
18  * wlanfae <wlanfae@realtek.com>
19  * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
20  * Hsinchu 300, Taiwan.
21  *
22  * Larry Finger <Larry.Finger@lwfinger.net>
23  *
24  *****************************************************************************/
25 
26 #include "../pwrseqcmd.h"
27 #include "pwrseq.h"
28 
29 /* drivers should parse below arrays and do the corresponding actions */
30 /*3 Power on  Array*/
31 struct wlan_pwr_cfg rtl8723A_power_on_flow
32 		[RTL8723A_TRANS_CARDEMU_TO_ACT_STEPS +
33 		 RTL8723A_TRANS_END_STEPS] = {
34 	RTL8723A_TRANS_CARDEMU_TO_ACT
35 	RTL8723A_TRANS_END
36 };
37 
38 /*3Radio off GPIO Array */
39 struct wlan_pwr_cfg rtl8723A_radio_off_flow
40 		[RTL8723A_TRANS_ACT_TO_CARDEMU_STEPS +
41 		 RTL8723A_TRANS_END_STEPS] = {
42 	RTL8723A_TRANS_ACT_TO_CARDEMU
43 	RTL8723A_TRANS_END
44 };
45 
46 /*3Card Disable Array*/
47 struct wlan_pwr_cfg rtl8723A_card_disable_flow
48 		[RTL8723A_TRANS_ACT_TO_CARDEMU_STEPS +
49 		 RTL8723A_TRANS_CARDEMU_TO_PDN_STEPS +
50 		 RTL8723A_TRANS_END_STEPS] = {
51 	RTL8723A_TRANS_ACT_TO_CARDEMU
52 	RTL8723A_TRANS_CARDEMU_TO_CARDDIS
53 	RTL8723A_TRANS_END
54 };
55 
56 /*3 Card Enable Array*/
57 struct wlan_pwr_cfg rtl8723A_card_enable_flow
58 		[RTL8723A_TRANS_ACT_TO_CARDEMU_STEPS +
59 		 RTL8723A_TRANS_CARDEMU_TO_PDN_STEPS +
60 		 RTL8723A_TRANS_END_STEPS] = {
61 	RTL8723A_TRANS_CARDDIS_TO_CARDEMU
62 	RTL8723A_TRANS_CARDEMU_TO_ACT
63 	RTL8723A_TRANS_END
64 };
65 
66 /*3Suspend Array*/
67 struct wlan_pwr_cfg rtl8723A_suspend_flow
68 		[RTL8723A_TRANS_ACT_TO_CARDEMU_STEPS +
69 		 RTL8723A_TRANS_CARDEMU_TO_SUS_STEPS +
70 		 RTL8723A_TRANS_END_STEPS] = {
71 	RTL8723A_TRANS_ACT_TO_CARDEMU
72 	RTL8723A_TRANS_CARDEMU_TO_SUS
73 	RTL8723A_TRANS_END
74 };
75 
76 /*3 Resume Array*/
77 struct wlan_pwr_cfg rtl8723A_resume_flow
78 		[RTL8723A_TRANS_ACT_TO_CARDEMU_STEPS +
79 		 RTL8723A_TRANS_CARDEMU_TO_SUS_STEPS +
80 		 RTL8723A_TRANS_END_STEPS] = {
81 	RTL8723A_TRANS_SUS_TO_CARDEMU
82 	RTL8723A_TRANS_CARDEMU_TO_ACT
83 	RTL8723A_TRANS_END
84 };
85 
86 /*3HWPDN Array*/
87 struct wlan_pwr_cfg rtl8723A_hwpdn_flow
88 		[RTL8723A_TRANS_ACT_TO_CARDEMU_STEPS +
89 		 RTL8723A_TRANS_CARDEMU_TO_PDN_STEPS +
90 		 RTL8723A_TRANS_END_STEPS] = {
91 	RTL8723A_TRANS_ACT_TO_CARDEMU
92 	RTL8723A_TRANS_CARDEMU_TO_PDN
93 	RTL8723A_TRANS_END
94 };
95 
96 /*3 Enter LPS */
97 struct wlan_pwr_cfg rtl8723A_enter_lps_flow
98 		[RTL8723A_TRANS_ACT_TO_LPS_STEPS +
99 		 RTL8723A_TRANS_END_STEPS] = {
100 	/*FW behavior*/
101 	RTL8723A_TRANS_ACT_TO_LPS
102 	RTL8723A_TRANS_END
103 };
104 
105 /*3 Leave LPS */
106 struct wlan_pwr_cfg rtl8723A_leave_lps_flow
107 		[RTL8723A_TRANS_LPS_TO_ACT_STEPS +
108 		 RTL8723A_TRANS_END_STEPS] = {
109 	/*FW behavior*/
110 	RTL8723A_TRANS_LPS_TO_ACT
111 	RTL8723A_TRANS_END
112 };
113