mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
wifi: power save: turn off the reset pin when wifi is closed
Change-Id: I06b188d9a67319d2508f016595e73b2f1d97fa99 Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
This commit is contained in:
committed by
Gerrit Code Review
parent
dfe6a838f9
commit
a7352aa663
@@ -386,7 +386,7 @@ EXPORT_SYMBOL(mmc_alloc_host);
|
||||
* prepared to start servicing requests before this function
|
||||
* completes.
|
||||
*/
|
||||
static struct mmc_host *primary_sdio_host;
|
||||
struct mmc_host *primary_sdio_host;
|
||||
int mmc_add_host(struct mmc_host *host)
|
||||
{
|
||||
int err;
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <linux/rockchip/common.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/mfd/syscon.h>
|
||||
#include <linux/mmc/host.h>
|
||||
#ifdef CONFIG_OF
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_device.h>
|
||||
@@ -53,6 +54,9 @@
|
||||
|
||||
#define LOG(x...) printk(KERN_INFO "[WLAN_RFKILL]: "x)
|
||||
|
||||
extern struct mmc_host *primary_sdio_host;
|
||||
extern void mmc_pwrseq_power_off(struct mmc_host *host);
|
||||
|
||||
struct rfkill_wlan_data {
|
||||
struct rksdmmc_gpio_wifi_moudle *pdata;
|
||||
struct wake_lock wlan_irq_wl;
|
||||
@@ -290,6 +294,9 @@ int rockchip_wifi_power(int on)
|
||||
|
||||
LOG("%s: %d\n", __func__, on);
|
||||
|
||||
if (!on && primary_sdio_host)
|
||||
mmc_pwrseq_power_off(primary_sdio_host);
|
||||
|
||||
if (mrfkill == NULL) {
|
||||
LOG("%s: rfkill-wlan driver has not Successful initialized\n", __func__);
|
||||
return -1;
|
||||
@@ -380,7 +387,6 @@ EXPORT_SYMBOL(rockchip_wifi_power);
|
||||
* Wifi Sdio Detect Func
|
||||
*
|
||||
*************************************************************************/
|
||||
#include <linux/mmc/host.h>
|
||||
extern int mmc_host_rescan(struct mmc_host *host, int val, int irq_type);
|
||||
int rockchip_wifi_set_carddetect(int val)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user