xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/rtl8188fu/hal/rtl8188f/Hal8188FPwrSeq.c (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /******************************************************************************
3  *
4  * Copyright(c) Semiconductor - 2017 Realtek Corporation.
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms of version 2 of the GNU General Public License as
8  * published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13  * more details.
14  *
15  *****************************************************************************/
16 
17 
18 #include "Hal8188FPwrSeq.h"
19 
20 
21 /*
22     drivers should parse below arrays and do the corresponding actions
23 */
24 /*3 Power on  Array */
25 WLAN_PWR_CFG rtl8188F_power_on_flow[RTL8188F_TRANS_CARDEMU_TO_ACT_STEPS + RTL8188F_TRANS_END_STEPS] = {
26 	RTL8188F_TRANS_CARDEMU_TO_ACT
27 	RTL8188F_TRANS_END
28 };
29 
30 /*3Radio off GPIO Array */
31 WLAN_PWR_CFG rtl8188F_radio_off_flow[RTL8188F_TRANS_ACT_TO_CARDEMU_STEPS + RTL8188F_TRANS_END_STEPS] = {
32 	RTL8188F_TRANS_ACT_TO_CARDEMU
33 	RTL8188F_TRANS_END
34 };
35 
36 /*3Card Disable Array */
37 WLAN_PWR_CFG rtl8188F_card_disable_flow[RTL8188F_TRANS_ACT_TO_CARDEMU_STEPS + RTL8188F_TRANS_CARDEMU_TO_PDN_STEPS + RTL8188F_TRANS_END_STEPS] = {
38 	RTL8188F_TRANS_ACT_TO_CARDEMU
39 	RTL8188F_TRANS_CARDEMU_TO_CARDDIS
40 	RTL8188F_TRANS_END
41 };
42 
43 /*3 Card Enable Array */
44 WLAN_PWR_CFG rtl8188F_card_enable_flow[RTL8188F_TRANS_ACT_TO_CARDEMU_STEPS + RTL8188F_TRANS_CARDEMU_TO_PDN_STEPS + RTL8188F_TRANS_END_STEPS] = {
45 	RTL8188F_TRANS_CARDDIS_TO_CARDEMU
46 	RTL8188F_TRANS_CARDEMU_TO_ACT
47 	RTL8188F_TRANS_END
48 };
49 
50 /*3Suspend Array */
51 WLAN_PWR_CFG rtl8188F_suspend_flow[RTL8188F_TRANS_ACT_TO_CARDEMU_STEPS + RTL8188F_TRANS_CARDEMU_TO_SUS_STEPS + RTL8188F_TRANS_END_STEPS] = {
52 	RTL8188F_TRANS_ACT_TO_CARDEMU
53 	RTL8188F_TRANS_CARDEMU_TO_SUS
54 	RTL8188F_TRANS_END
55 };
56 
57 /*3 Resume Array */
58 WLAN_PWR_CFG rtl8188F_resume_flow[RTL8188F_TRANS_ACT_TO_CARDEMU_STEPS + RTL8188F_TRANS_CARDEMU_TO_SUS_STEPS + RTL8188F_TRANS_END_STEPS] = {
59 	RTL8188F_TRANS_SUS_TO_CARDEMU
60 	RTL8188F_TRANS_CARDEMU_TO_ACT
61 	RTL8188F_TRANS_END
62 };
63 
64 
65 
66 /*3HWPDN Array */
67 WLAN_PWR_CFG rtl8188F_hwpdn_flow[RTL8188F_TRANS_ACT_TO_CARDEMU_STEPS + RTL8188F_TRANS_CARDEMU_TO_PDN_STEPS + RTL8188F_TRANS_END_STEPS] = {
68 	RTL8188F_TRANS_ACT_TO_CARDEMU
69 	RTL8188F_TRANS_CARDEMU_TO_PDN
70 	RTL8188F_TRANS_END
71 };
72 
73 /*3 Enter LPS */
74 WLAN_PWR_CFG rtl8188F_enter_lps_flow[RTL8188F_TRANS_ACT_TO_LPS_STEPS + RTL8188F_TRANS_END_STEPS] = {
75 	/*FW behavior */
76 	RTL8188F_TRANS_ACT_TO_LPS
77 	RTL8188F_TRANS_END
78 };
79 
80 /*3 Leave LPS */
81 WLAN_PWR_CFG rtl8188F_leave_lps_flow[RTL8188F_TRANS_LPS_TO_ACT_STEPS + RTL8188F_TRANS_END_STEPS] = {
82 	/*FW behavior */
83 	RTL8188F_TRANS_LPS_TO_ACT
84 	RTL8188F_TRANS_END
85 };
86 
87 /*3 Enter SW LPS */
88 WLAN_PWR_CFG rtl8188F_enter_swlps_flow[RTL8188F_TRANS_ACT_TO_SWLPS_STEPS + RTL8188F_TRANS_END_STEPS] = {
89 	/*SW behavior */
90 	RTL8188F_TRANS_ACT_TO_SWLPS
91 	RTL8188F_TRANS_END
92 };
93 
94 /*3 Leave SW LPS */
95 WLAN_PWR_CFG rtl8188F_leave_swlps_flow[RTL8188F_TRANS_SWLPS_TO_ACT_STEPS + RTL8188F_TRANS_END_STEPS] = {
96 	/*SW behavior */
97 	RTL8188F_TRANS_SWLPS_TO_ACT
98 	RTL8188F_TRANS_END
99 };
100