Merge branch 'develop-3.10-next' of 10.10.10.29:rk/kernel into develop-3.10-next
[firefly-linux-kernel-4.4.55.git] / include / linux / rfkill-wlan.h
1 #ifndef __PLAT_BOARD_H
2 #define __PLAT_BOARD_H
3
4 #include <linux/types.h>
5 #include <linux/init.h>
6 #include <linux/device.h>
7
8 struct rksdmmc_iomux {
9     char    *name;  //set the MACRO of gpio
10     int     fgpio;
11     int     fmux;
12 };
13
14 struct rksdmmc_gpio {
15     int     io;                             //set the address of gpio
16     char    name[64];   //
17     int     enable;  // disable = !enable   //set the default value,i.e,GPIO_HIGH or GPIO_LOW
18     struct rksdmmc_iomux  iomux;
19 };
20
21 struct rksdmmc_pmu {
22     bool power_ctrl_by_pmu;
23     char pmu_regulator[20];
24     int  enable;
25 };
26
27 struct rksdmmc_gpio_wifi_moudle {
28     int sdio_vol;    //sdio reference voltage
29     bool vref_ctrl_enble;
30     bool wifi_power_remain;
31     struct rksdmmc_pmu    mregulator;
32     struct rksdmmc_pmu    ioregulator;
33     struct rksdmmc_gpio   power_n;  //PMU_EN  
34     struct rksdmmc_gpio   reset_n;  //SYSRET_B, DAIRST 
35     struct rksdmmc_gpio   vddio;
36     struct rksdmmc_gpio   bgf_int_b;
37     struct rksdmmc_gpio   wifi_int_b;
38     struct rksdmmc_gpio   gps_sync;
39     struct rksdmmc_gpio   ANTSEL2;  //pin5--ANTSEL2  
40     struct rksdmmc_gpio   ANTSEL3;  //pin6--ANTSEL3 
41     struct rksdmmc_gpio   GPS_LAN;  //pin33--GPS_LAN
42     struct regmap *grf;
43 };
44
45 enum {
46     WIFI_BCMWIFI,
47     WIFI_RTKWIFI,
48     WIFI_ESP8089,
49     TYPE_MAX,
50 };
51
52 int rfkill_get_wifi_power_state(int *power, int *vref_ctrl_enable);
53 void *rockchip_mem_prealloc(int section, unsigned long size);
54 int rockchip_wifi_ref_voltage(int on);
55 int rockchip_wifi_power(int on);
56 int rockchip_wifi_set_carddetect(int val);
57 int rockchip_wifi_get_oob_irq(void);
58 int rockchip_wifi_reset(int on);
59 int rockchip_wifi_mac_addr(unsigned char *buf);
60 void *rockchip_wifi_country_code(char *ccode);
61 #endif