net: wireless: rockchip_wlan: add rtl8723ds support
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rockchip_wlan / rtl8723ds / hal / rtl8723d / sdio / rtl8723ds_led.c
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
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  * You should have received a copy of the GNU General Public License along with
15  * this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
17  *
18  *
19  ******************************************************************************/
20 #define _RTL8723DS_LED_C_
21
22 #include "rtl8723d_hal.h"
23
24 /* ********************************************************************************
25  * LED object.
26  * ******************************************************************************** */
27
28
29 /* ********************************************************************************
30  *      Prototype of protected function.
31  * ******************************************************************************** */
32
33 /* ********************************************************************************
34  * LED_819xUsb routines.
35  * ******************************************************************************** */
36
37 /*
38  *      Description:
39  *              Turn on LED according to LedPin specified.
40  *   */
41 void
42 SwLedOn_8723DS(
43         _adapter                        *padapter,
44         PLED_SDIO               pLed
45 )
46 {
47         u8      LedCfg;
48         HAL_DATA_TYPE   *pHalData = GET_HAL_DATA(padapter);
49
50         if (RTW_CANNOT_RUN(padapter))
51                 return;
52
53         pLed->bLedOn = _TRUE;
54
55 }
56
57
58 /*
59  *      Description:
60  *              Turn off LED according to LedPin specified.
61  *   */
62 void
63 SwLedOff_8723DS(
64         _adapter                        *padapter,
65         PLED_SDIO               pLed
66 )
67 {
68         u8      LedCfg;
69         HAL_DATA_TYPE   *pHalData = GET_HAL_DATA(padapter);
70
71         if (RTW_CANNOT_RUN(padapter))
72                 goto exit;
73
74 exit:
75         pLed->bLedOn = _FALSE;
76
77 }
78
79 /* ********************************************************************************
80  * Interface to manipulate LED objects.
81  * ******************************************************************************** */
82
83 /* ********************************************************************************
84  * Default LED behavior.
85  * ******************************************************************************** */
86
87 /*
88  *      Description:
89  *              Initialize all LED_871x objects.
90  *   */
91 void
92 rtl8723ds_InitSwLeds(
93         _adapter        *padapter
94 )
95 {
96 #if 0
97         struct led_priv *pledpriv = &(padapter->ledpriv);
98
99         pledpriv->LedControlHandler = LedControlSDIO;
100
101         pledpriv->SwLedOn = SwLedOn_8723DS;
102         pledpriv->SwLedOff = SwLedOff_8723DS;
103
104         InitLed871x(padapter, &(pledpriv->SwLed0), LED_PIN_LED0);
105
106         InitLed871x(padapter, &(pledpriv->SwLed1), LED_PIN_LED1);
107 #endif
108 }
109
110
111 /*
112  *      Description:
113  *              DeInitialize all LED_819xUsb objects.
114  *   */
115 void
116 rtl8723ds_DeInitSwLeds(
117         _adapter        *padapter
118 )
119 {
120 #if 0
121         struct led_priv *ledpriv = &(padapter->ledpriv);
122
123         DeInitLed871x(&(ledpriv->SwLed0));
124         DeInitLed871x(&(ledpriv->SwLed1));
125 #endif
126 }