8723BU: Update 8723BU wifi driver to version v4.3.16_14189.20150519_BTCOEX2015119...
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rockchip_wlan / rtl8723bu / platform / platform_arm_act_sdio.c
1 /******************************************************************************
2  *
3  * Copyright(c) 2013 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 /*
21  * Description:
22  *      This file can be applied to following platforms:
23  *    CONFIG_PLATFORM_ACTIONS_ATM703X
24  */
25 #include <drv_types.h>
26
27 #ifdef CONFIG_PLATFORM_ACTIONS_ATM705X
28 extern int acts_wifi_init(void);
29 extern void acts_wifi_cleanup(void);
30 #endif
31
32 /*
33  * Return:
34  *      0:      power on successfully
35  *      others: power on failed
36  */
37 int platform_wifi_power_on(void)
38 {
39         int ret = 0;
40
41 #ifdef CONFIG_PLATFORM_ACTIONS_ATM705X
42         ret = acts_wifi_init();
43         if (unlikely(ret < 0)) {
44                 pr_err("%s Failed to register the power control driver.\n", __FUNCTION__);
45                 goto exit;
46         }
47 #endif
48
49 exit:
50         return ret;
51 }
52
53 void platform_wifi_power_off(void)
54 {
55 #ifdef CONFIG_PLATFORM_ACTIONS_ATM705X
56         acts_wifi_cleanup();
57 #endif
58 }