pwrseq.c 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  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. #include "../pwrseqcmd.h"
  26. #include "pwrseq.h"
  27. /* drivers should parse below arrays and do the corresponding actions */
  28. /* 3 Power on Array */
  29. struct wlan_pwr_cfg rtl8812_power_on_flow[RTL8812_TRANS_CARDEMU_TO_ACT_STEPS +
  30. RTL8812_TRANS_END_STEPS] = {
  31. RTL8812_TRANS_CARDEMU_TO_ACT
  32. RTL8812_TRANS_END
  33. };
  34. /* 3Radio off GPIO Array */
  35. struct wlan_pwr_cfg rtl8812_radio_off_flow[RTL8812_TRANS_ACT_TO_CARDEMU_STEPS +
  36. RTL8812_TRANS_END_STEPS] = {
  37. RTL8812_TRANS_ACT_TO_CARDEMU
  38. RTL8812_TRANS_END
  39. };
  40. /* 3Card Disable Array */
  41. struct wlan_pwr_cfg rtl8812_card_disable_flow[RTL8812_TRANS_ACT_TO_CARDEMU_STEPS
  42. + RTL8812_TRANS_CARDEMU_TO_PDN_STEPS
  43. + RTL8812_TRANS_END_STEPS] = {
  44. RTL8812_TRANS_ACT_TO_CARDEMU
  45. RTL8812_TRANS_CARDEMU_TO_CARDDIS
  46. RTL8812_TRANS_END
  47. };
  48. /* 3 Card Enable Array */
  49. struct wlan_pwr_cfg rtl8812_card_enable_flow[RTL8812_TRANS_ACT_TO_CARDEMU_STEPS
  50. + RTL8812_TRANS_CARDEMU_TO_PDN_STEPS
  51. + RTL8812_TRANS_END_STEPS] = {
  52. RTL8812_TRANS_CARDDIS_TO_CARDEMU
  53. RTL8812_TRANS_CARDEMU_TO_ACT
  54. RTL8812_TRANS_END
  55. };
  56. /* 3Suspend Array */
  57. struct wlan_pwr_cfg rtl8812_suspend_flow[RTL8812_TRANS_ACT_TO_CARDEMU_STEPS +
  58. RTL8812_TRANS_CARDEMU_TO_SUS_STEPS +
  59. RTL8812_TRANS_END_STEPS] = {
  60. RTL8812_TRANS_ACT_TO_CARDEMU
  61. RTL8812_TRANS_CARDEMU_TO_SUS
  62. RTL8812_TRANS_END
  63. };
  64. /* 3 Resume Array */
  65. struct wlan_pwr_cfg rtl8812_resume_flow[RTL8812_TRANS_ACT_TO_CARDEMU_STEPS +
  66. RTL8812_TRANS_CARDEMU_TO_SUS_STEPS +
  67. RTL8812_TRANS_END_STEPS] = {
  68. RTL8812_TRANS_SUS_TO_CARDEMU
  69. RTL8812_TRANS_CARDEMU_TO_ACT
  70. RTL8812_TRANS_END
  71. };
  72. /* 3HWPDN Array */
  73. struct wlan_pwr_cfg rtl8812_hwpdn_flow[RTL8812_TRANS_ACT_TO_CARDEMU_STEPS +
  74. RTL8812_TRANS_CARDEMU_TO_PDN_STEPS +
  75. RTL8812_TRANS_END_STEPS] = {
  76. RTL8812_TRANS_ACT_TO_CARDEMU
  77. RTL8812_TRANS_CARDEMU_TO_PDN
  78. RTL8812_TRANS_END
  79. };
  80. /* 3 Enter LPS */
  81. struct wlan_pwr_cfg rtl8812_enter_lps_flow[RTL8812_TRANS_ACT_TO_LPS_STEPS +
  82. RTL8812_TRANS_END_STEPS] = {
  83. /* FW behavior */
  84. RTL8812_TRANS_ACT_TO_LPS
  85. RTL8812_TRANS_END
  86. };
  87. /* 3 Leave LPS */
  88. struct wlan_pwr_cfg rtl8812_leave_lps_flow[RTL8812_TRANS_LPS_TO_ACT_STEPS +
  89. RTL8812_TRANS_END_STEPS] = {
  90. /* FW behavior */
  91. RTL8812_TRANS_LPS_TO_ACT
  92. RTL8812_TRANS_END
  93. };
  94. /* drivers should parse below arrays and do the corresponding actions */
  95. /*3 Power on Array*/
  96. struct wlan_pwr_cfg rtl8821A_power_on_flow[RTL8821A_TRANS_CARDEMU_TO_ACT_STEPS
  97. + RTL8821A_TRANS_END_STEPS] = {
  98. RTL8821A_TRANS_CARDEMU_TO_ACT
  99. RTL8821A_TRANS_END
  100. };
  101. /*3Radio off GPIO Array */
  102. struct wlan_pwr_cfg rtl8821A_radio_off_flow[RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS
  103. + RTL8821A_TRANS_END_STEPS] = {
  104. RTL8821A_TRANS_ACT_TO_CARDEMU
  105. RTL8821A_TRANS_END
  106. };
  107. /*3Card Disable Array*/
  108. struct wlan_pwr_cfg rtl8821A_card_disable_flow
  109. [RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS
  110. + RTL8821A_TRANS_CARDEMU_TO_PDN_STEPS
  111. + RTL8821A_TRANS_END_STEPS] = {
  112. RTL8821A_TRANS_ACT_TO_CARDEMU
  113. RTL8821A_TRANS_CARDEMU_TO_CARDDIS
  114. RTL8821A_TRANS_END
  115. };
  116. /*3 Card Enable Array*/
  117. /*RTL8821A_TRANS_CARDEMU_TO_PDN_STEPS*/
  118. struct wlan_pwr_cfg rtl8821A_card_enable_flow
  119. [RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS
  120. + RTL8821A_TRANS_CARDEMU_TO_ACT_STEPS
  121. + RTL8821A_TRANS_END_STEPS] = {
  122. RTL8821A_TRANS_CARDDIS_TO_CARDEMU
  123. RTL8821A_TRANS_CARDEMU_TO_ACT
  124. RTL8821A_TRANS_END
  125. };
  126. /*3Suspend Array*/
  127. struct wlan_pwr_cfg rtl8821A_suspend_flow[RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS
  128. + RTL8821A_TRANS_CARDEMU_TO_SUS_STEPS
  129. + RTL8821A_TRANS_END_STEPS] = {
  130. RTL8821A_TRANS_ACT_TO_CARDEMU
  131. RTL8821A_TRANS_CARDEMU_TO_SUS
  132. RTL8821A_TRANS_END
  133. };
  134. /*3 Resume Array*/
  135. struct wlan_pwr_cfg rtl8821A_resume_flow[RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS
  136. + RTL8821A_TRANS_CARDEMU_TO_SUS_STEPS
  137. + RTL8821A_TRANS_END_STEPS] = {
  138. RTL8821A_TRANS_SUS_TO_CARDEMU
  139. RTL8821A_TRANS_CARDEMU_TO_ACT
  140. RTL8821A_TRANS_END
  141. };
  142. /*3HWPDN Array*/
  143. struct wlan_pwr_cfg rtl8821A_hwpdn_flow[RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS
  144. + RTL8821A_TRANS_CARDEMU_TO_PDN_STEPS
  145. + RTL8821A_TRANS_END_STEPS] = {
  146. RTL8821A_TRANS_ACT_TO_CARDEMU
  147. RTL8821A_TRANS_CARDEMU_TO_PDN
  148. RTL8821A_TRANS_END
  149. };
  150. /*3 Enter LPS */
  151. struct wlan_pwr_cfg rtl8821A_enter_lps_flow[RTL8821A_TRANS_ACT_TO_LPS_STEPS
  152. + RTL8821A_TRANS_END_STEPS] = {
  153. /*FW behavior*/
  154. RTL8821A_TRANS_ACT_TO_LPS
  155. RTL8821A_TRANS_END
  156. };
  157. /*3 Leave LPS */
  158. struct wlan_pwr_cfg rtl8821A_leave_lps_flow[RTL8821A_TRANS_LPS_TO_ACT_STEPS
  159. + RTL8821A_TRANS_END_STEPS] = {
  160. /*FW behavior*/
  161. RTL8821A_TRANS_LPS_TO_ACT
  162. RTL8821A_TRANS_END
  163. };