net: wireless: rockchip_wlan: add rtl8723bs support
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rockchip_wlan / rtl8723bs / hal / rtl8723b / sdio / rtl8723bs_led.c
1 /******************************************************************************\r
2  *\r
3  * Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.\r
4  *\r
5  * This program is free software; you can redistribute it and/or modify it\r
6  * under the terms of version 2 of the GNU General Public License as\r
7  * published by the Free Software Foundation.\r
8  *\r
9  * This program is distributed in the hope that it will be useful, but WITHOUT\r
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\r
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\r
12  * more details.\r
13  *\r
14  * You should have received a copy of the GNU General Public License along with\r
15  * this program; if not, write to the Free Software Foundation, Inc.,\r
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA\r
17  *\r
18  *\r
19  ******************************************************************************/\r
20 #define _RTL8723BS_LED_C_\r
21 \r
22 #include "rtl8723b_hal.h"\r
23 \r
24 //================================================================================\r
25 // LED object.\r
26 //================================================================================\r
27 \r
28 \r
29 //================================================================================\r
30 //      Prototype of protected function.\r
31 //================================================================================\r
32 \r
33 //================================================================================\r
34 // LED_819xUsb routines.\r
35 //================================================================================\r
36 \r
37 //\r
38 //      Description:\r
39 //              Turn on LED according to LedPin specified.\r
40 //\r
41 void\r
42 SwLedOn_8723BS(\r
43         _adapter                        *padapter,\r
44         PLED_SDIO               pLed\r
45 )\r
46 {\r
47         u8      LedCfg;\r
48         HAL_DATA_TYPE   *pHalData = GET_HAL_DATA(padapter);\r
49 \r
50         if (RTW_CANNOT_RUN(padapter))\r
51                 return;\r
52 \r
53         pLed->bLedOn = _TRUE;\r
54 \r
55 }\r
56 \r
57 \r
58 //\r
59 //      Description:\r
60 //              Turn off LED according to LedPin specified.\r
61 //\r
62 void\r
63 SwLedOff_8723BS(\r
64         _adapter                        *padapter,\r
65         PLED_SDIO               pLed\r
66 )\r
67 {\r
68         u8      LedCfg;\r
69         HAL_DATA_TYPE   *pHalData = GET_HAL_DATA(padapter);\r
70 \r
71         if (RTW_CANNOT_RUN(padapter))\r
72                 goto exit;\r
73 \r
74 exit:\r
75         pLed->bLedOn = _FALSE;\r
76 \r
77 }\r
78 \r
79 //================================================================================\r
80 // Interface to manipulate LED objects.\r
81 //================================================================================\r
82 \r
83 //================================================================================\r
84 // Default LED behavior.\r
85 //================================================================================\r
86 \r
87 //\r
88 //      Description:\r
89 //              Initialize all LED_871x objects.\r
90 //\r
91 void\r
92 rtl8723bs_InitSwLeds(\r
93         _adapter        *padapter\r
94         )\r
95 {\r
96 #if 0\r
97         struct led_priv *pledpriv = &(padapter->ledpriv);\r
98 \r
99         pledpriv->LedControlHandler = LedControlSDIO;\r
100 \r
101         pledpriv->SwLedOn = SwLedOn_8723BS;\r
102         pledpriv->SwLedOff = SwLedOff_8723BS;\r
103         \r
104         InitLed871x(padapter, &(pledpriv->SwLed0), LED_PIN_LED0);\r
105 \r
106         InitLed871x(padapter,&(pledpriv->SwLed1), LED_PIN_LED1);\r
107 #endif\r
108 }\r
109 \r
110 \r
111 //\r
112 //      Description:\r
113 //              DeInitialize all LED_819xUsb objects.\r
114 //\r
115 void\r
116 rtl8723bs_DeInitSwLeds(\r
117         _adapter        *padapter\r
118         )\r
119 {\r
120 #if 0\r
121         struct led_priv *ledpriv = &(padapter->ledpriv);\r
122 \r
123         DeInitLed871x( &(ledpriv->SwLed0) );\r
124         DeInitLed871x( &(ledpriv->SwLed1) );\r
125 #endif\r
126 }\r
127 \r