xref: /linux/drivers/net/wireless/realtek/rtlwifi/rtl8723be/pwrseq.c (revision e5c86679d5e864947a52fb31e45a425dea3e7fa9)
1 /******************************************************************************
2  *
3  * Copyright(c) 2009-2014  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 
30 /* drivers should parse below arrays and do the corresponding actions */
31 /*3 Power on  Array*/
32 struct wlan_pwr_cfg rtl8723B_power_on_flow[RTL8723B_TRANS_CARDEMU_TO_ACT_STEPS +
33 					   RTL8723B_TRANS_END_STEPS] = {
34 	RTL8723B_TRANS_CARDEMU_TO_ACT
35 	RTL8723B_TRANS_END
36 };
37 
38 /*3Radio off GPIO Array */
39 struct wlan_pwr_cfg rtl8723B_radio_off_flow[RTL8723B_TRANS_ACT_TO_CARDEMU_STEPS
40 					    + RTL8723B_TRANS_END_STEPS] = {
41 	RTL8723B_TRANS_ACT_TO_CARDEMU
42 	RTL8723B_TRANS_END
43 };
44 
45 /*3Card Disable Array*/
46 struct wlan_pwr_cfg rtl8723B_card_disable_flow
47 				[RTL8723B_TRANS_ACT_TO_CARDEMU_STEPS +
48 				 RTL8723B_TRANS_CARDEMU_TO_PDN_STEPS +
49 				 RTL8723B_TRANS_END_STEPS] = {
50 	RTL8723B_TRANS_ACT_TO_CARDEMU
51 	RTL8723B_TRANS_CARDEMU_TO_CARDDIS
52 	RTL8723B_TRANS_END
53 };
54 
55 /*3 Card Enable Array*/
56 struct wlan_pwr_cfg rtl8723B_card_enable_flow
57 				[RTL8723B_TRANS_ACT_TO_CARDEMU_STEPS +
58 				 RTL8723B_TRANS_CARDEMU_TO_PDN_STEPS +
59 				 RTL8723B_TRANS_END_STEPS] = {
60 	RTL8723B_TRANS_CARDDIS_TO_CARDEMU
61 	RTL8723B_TRANS_CARDEMU_TO_ACT
62 	RTL8723B_TRANS_END
63 };
64 
65 /*3Suspend Array*/
66 struct wlan_pwr_cfg rtl8723B_suspend_flow[RTL8723B_TRANS_ACT_TO_CARDEMU_STEPS +
67 					  RTL8723B_TRANS_CARDEMU_TO_SUS_STEPS +
68 					  RTL8723B_TRANS_END_STEPS] = {
69 	RTL8723B_TRANS_ACT_TO_CARDEMU
70 	RTL8723B_TRANS_CARDEMU_TO_SUS
71 	RTL8723B_TRANS_END
72 };
73 
74 /*3 Resume Array*/
75 struct wlan_pwr_cfg rtl8723B_resume_flow[RTL8723B_TRANS_ACT_TO_CARDEMU_STEPS +
76 					 RTL8723B_TRANS_CARDEMU_TO_SUS_STEPS +
77 					 RTL8723B_TRANS_END_STEPS] = {
78 	RTL8723B_TRANS_SUS_TO_CARDEMU
79 	RTL8723B_TRANS_CARDEMU_TO_ACT
80 	RTL8723B_TRANS_END
81 };
82 
83 /*3HWPDN Array*/
84 struct wlan_pwr_cfg rtl8723B_hwpdn_flow[RTL8723B_TRANS_ACT_TO_CARDEMU_STEPS +
85 					RTL8723B_TRANS_CARDEMU_TO_PDN_STEPS +
86 					RTL8723B_TRANS_END_STEPS] = {
87 	RTL8723B_TRANS_ACT_TO_CARDEMU
88 	RTL8723B_TRANS_CARDEMU_TO_PDN
89 	RTL8723B_TRANS_END
90 };
91 
92 /*3 Enter LPS */
93 struct wlan_pwr_cfg rtl8723B_enter_lps_flow[RTL8723B_TRANS_ACT_TO_LPS_STEPS +
94 					    RTL8723B_TRANS_END_STEPS] = {
95 	/*FW behavior*/
96 	RTL8723B_TRANS_ACT_TO_LPS
97 	RTL8723B_TRANS_END
98 };
99 
100 /*3 Leave LPS */
101 struct wlan_pwr_cfg rtl8723B_leave_lps_flow[RTL8723B_TRANS_LPS_TO_ACT_STEPS +
102 					    RTL8723B_TRANS_END_STEPS] = {
103 	/*FW behavior*/
104 	RTL8723B_TRANS_LPS_TO_ACT
105 	RTL8723B_TRANS_END
106 };
107