Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
[cascardo/linux.git] / drivers / staging / rtl8192ee / rtl8192ee / pwrseq.c
1 /******************************************************************************
2  *
3  * Copyright(c) 2009-2010  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 /*
31     drivers should parse below arrays and do the corresponding actions
32 */
33 /*3 Power on  Array*/
34 struct wlan_pwr_cfg rtl8192E_power_on_flow[RTL8192E_TRANS_CARDEMU_TO_ACT_STEPS +
35                                            RTL8192E_TRANS_END_STEPS] = {
36         RTL8192E_TRANS_CARDEMU_TO_ACT
37         RTL8192E_TRANS_END
38 };
39
40 /*3Radio off GPIO Array */
41 struct wlan_pwr_cfg rtl8192E_radio_off_flow[RTL8192E_TRANS_ACT_TO_CARDEMU_STEPS
42                                             + RTL8192E_TRANS_END_STEPS] = {
43         RTL8192E_TRANS_ACT_TO_CARDEMU
44         RTL8192E_TRANS_END
45 };
46
47 /*3Card Disable Array*/
48 struct wlan_pwr_cfg rtl8192E_card_disable_flow
49                                         [RTL8192E_TRANS_ACT_TO_CARDEMU_STEPS +
50                                          RTL8192E_TRANS_CARDEMU_TO_PDN_STEPS +
51                                          RTL8192E_TRANS_END_STEPS] = {
52         RTL8192E_TRANS_ACT_TO_CARDEMU
53         RTL8192E_TRANS_CARDEMU_TO_CARDDIS
54         RTL8192E_TRANS_END
55 };
56
57 /*3 Card Enable Array*/
58 struct wlan_pwr_cfg rtl8192E_card_enable_flow
59                                         [RTL8192E_TRANS_ACT_TO_CARDEMU_STEPS +
60                                          RTL8192E_TRANS_CARDEMU_TO_PDN_STEPS +
61                                          RTL8192E_TRANS_END_STEPS] = {
62         RTL8192E_TRANS_CARDDIS_TO_CARDEMU
63         RTL8192E_TRANS_CARDEMU_TO_ACT
64         RTL8192E_TRANS_END
65 };
66
67 /*3Suspend Array*/
68 struct wlan_pwr_cfg rtl8192E_suspend_flow[RTL8192E_TRANS_ACT_TO_CARDEMU_STEPS +
69                                           RTL8192E_TRANS_CARDEMU_TO_SUS_STEPS +
70                                           RTL8192E_TRANS_END_STEPS] = {
71         RTL8192E_TRANS_ACT_TO_CARDEMU
72         RTL8192E_TRANS_CARDEMU_TO_SUS
73         RTL8192E_TRANS_END
74 };
75
76 /*3 Resume Array*/
77 struct wlan_pwr_cfg rtl8192E_resume_flow[RTL8192E_TRANS_ACT_TO_CARDEMU_STEPS +
78                                          RTL8192E_TRANS_CARDEMU_TO_SUS_STEPS +
79                                          RTL8192E_TRANS_END_STEPS] = {
80         RTL8192E_TRANS_SUS_TO_CARDEMU
81         RTL8192E_TRANS_CARDEMU_TO_ACT
82         RTL8192E_TRANS_END
83 };
84
85 /*3HWPDN Array*/
86 struct wlan_pwr_cfg rtl8192E_hwpdn_flow[RTL8192E_TRANS_ACT_TO_CARDEMU_STEPS +
87                                         RTL8192E_TRANS_CARDEMU_TO_PDN_STEPS +
88                                         RTL8192E_TRANS_END_STEPS] = {
89         RTL8192E_TRANS_ACT_TO_CARDEMU
90         RTL8192E_TRANS_CARDEMU_TO_PDN
91         RTL8192E_TRANS_END
92 };
93
94 /*3 Enter LPS */
95 struct wlan_pwr_cfg rtl8192E_enter_lps_flow[RTL8192E_TRANS_ACT_TO_LPS_STEPS +
96                                             RTL8192E_TRANS_END_STEPS] = {
97         /*FW behavior*/
98         RTL8192E_TRANS_ACT_TO_LPS
99         RTL8192E_TRANS_END
100 };
101
102 /*3 Leave LPS */
103 struct wlan_pwr_cfg rtl8192E_leave_lps_flow[RTL8192E_TRANS_LPS_TO_ACT_STEPS +
104                                             RTL8192E_TRANS_END_STEPS] = {
105         /*FW behavior*/
106         RTL8192E_TRANS_LPS_TO_ACT
107         RTL8192E_TRANS_END
108 };