wifi: add wifi power manage driver rfkill-wlan.c.

This commit is contained in:
gwl
2014-02-27 16:19:40 +08:00
parent 51af772efb
commit a0e2bfba26
4 changed files with 712 additions and 0 deletions

46
include/linux/rfkill-wlan.h Executable file
View File

@@ -0,0 +1,46 @@
#ifndef __PLAT_BOARD_H
#define __PLAT_BOARD_H
#include <linux/types.h>
#include <linux/init.h>
#include <linux/device.h>
struct rksdmmc_iomux {
char *name; //set the MACRO of gpio
int fgpio;
int fmux;
};
struct rksdmmc_gpio {
int io; //set the address of gpio
char name[64]; //
int enable; // disable = !enable //set the default value,i.e,GPIO_HIGH or GPIO_LOW
struct rksdmmc_iomux iomux;
};
struct rksdmmc_pmu {
bool power_ctrl_by_pmu;
char pmu_regulator[20];
int enable;
};
struct rksdmmc_gpio_wifi_moudle {
int sdio_vol; //sdio reference voltage
struct rksdmmc_pmu mregulator;
struct rksdmmc_gpio power_n; //PMU_EN
struct rksdmmc_gpio reset_n; //SYSRET_B, DAIRST
struct rksdmmc_gpio vddio;
struct rksdmmc_gpio bgf_int_b;
struct rksdmmc_gpio wifi_int_b;
struct rksdmmc_gpio gps_sync;
struct rksdmmc_gpio ANTSEL2; //pin5--ANTSEL2
struct rksdmmc_gpio ANTSEL3; //pin6--ANTSEL3
struct rksdmmc_gpio GPS_LAN; //pin33--GPS_LAN
};
void *rk29sdk_mem_prealloc(int section, unsigned long size);
int rk29sdk_wifi_power(int on);
int rk29sdk_wifi_reset(int on);
int rk29sdk_wifi_mac_addr(unsigned char *buf);
void *rk29sdk_wifi_country_code(char *ccode);
#endif

View File

@@ -47,3 +47,9 @@ config RFKILL_GPIO
If you say yes here you get support of a generic gpio RFKILL
driver. The platform should fill in the appropriate fields in the
rfkill_gpio_platform_data structure and pass that to the driver.
config RFKILL_RK
bool "Rockchips RFKILL driver"
depends on RFKILL
help
rockchips rfkill driver for rk29/rk3X

View File

@@ -7,3 +7,4 @@ rfkill-$(CONFIG_RFKILL_INPUT) += input.o
obj-$(CONFIG_RFKILL) += rfkill.o
obj-$(CONFIG_RFKILL_REGULATOR) += rfkill-regulator.o
obj-$(CONFIG_RFKILL_GPIO) += rfkill-gpio.o
obj-$(CONFIG_RFKILL_RK) += rfkill-wlan.o

659
net/rfkill/rfkill-wlan.c Executable file

File diff suppressed because it is too large Load Diff