diff options
author | Srikant Patnaik | 2015-01-11 12:28:04 +0530 |
---|---|---|
committer | Srikant Patnaik | 2015-01-11 12:28:04 +0530 |
commit | 871480933a1c28f8a9fed4c4d34d06c439a7a422 (patch) | |
tree | 8718f573808810c2a1e8cb8fb6ac469093ca2784 /drivers/net/wireless/eagle/sdio_stub.c | |
parent | 9d40ac5867b9aefe0722bc1f110b965ff294d30d (diff) | |
download | FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.gz FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.bz2 FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.zip |
Moved, renamed, and deleted files
The original directory structure was scattered and unorganized.
Changes are basically to make it look like kernel structure.
Diffstat (limited to 'drivers/net/wireless/eagle/sdio_stub.c')
-rwxr-xr-x | drivers/net/wireless/eagle/sdio_stub.c | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/drivers/net/wireless/eagle/sdio_stub.c b/drivers/net/wireless/eagle/sdio_stub.c new file mode 100755 index 00000000..77294c1e --- /dev/null +++ b/drivers/net/wireless/eagle/sdio_stub.c @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2013 Espressif System. + * + * sdio stub code for customer + */ + +#include <linux/gpio.h> +#include <mach/wmt_iomux.h> + +#define SDIO_ID 2 + +extern void wmt_detect_sdio2(void); +extern void force_remove_sdio2(void); + + +void sif_platform_rescan_card(unsigned insert) +{ + + printk("%s id %d %u\n", __func__, SDIO_ID, insert); + if (insert) + { + wmt_detect_sdio2(); + } + else + { + force_remove_sdio2(); + } +} + +void sif_platform_reset_target(void) +{ + int err; + + err = gpio_request(WMT_PIN_GP62_SUSGPIO1, "wifi_chip_en"); + if(err < 0) { + printk("reques gpio:%x failed!!! for wifi\n",WMT_PIN_GP62_SUSGPIO1); + }else{ + printk("request gpio:%d for wifi success!!!\n",WMT_PIN_GP62_SUSGPIO1); + } + + gpio_direction_output(WMT_PIN_GP62_SUSGPIO1, 0); + msleep(100); + gpio_direction_output(WMT_PIN_GP62_SUSGPIO1, 1); + mdelay(100); +} + +void sif_platform_target_poweroff(void) +{ + gpio_direction_output(WMT_PIN_GP62_SUSGPIO1, 0); + mdelay(100); + printk("eagle wifi module power off!\n"); + + gpio_free(WMT_PIN_GP62_SUSGPIO1); +} + +void sif_platform_target_poweron(void) +{ + int err; + + err = gpio_request(WMT_PIN_GP62_SUSGPIO1, "wifi_chip_en"); + if(err < 0) { + printk("reques gpio:%x failed!!! for wifi\n",WMT_PIN_GP62_SUSGPIO1); + }else{ + printk("request gpio:%d for wifi success!!!\n",WMT_PIN_GP62_SUSGPIO1); + } + + gpio_direction_output(WMT_PIN_GP62_SUSGPIO1, 0); + msleep(200); + gpio_direction_output(WMT_PIN_GP62_SUSGPIO1, 1); + mdelay(100); + printk("eagle wifi module power on!\n"); +} + +void sif_platform_target_speed(int high_speed) +{ +} + +void sif_platform_check_r1_ready(struct esp_pub *epub) +{ +} + +#ifdef ESP_ACK_INTERRUPT +extern void eagle_ack_interrupt(void); +void sif_platform_ack_interrupt(struct esp_pub *epub) +{ + eagle_ack_interrupt(); +} +#endif //ESP_ACK_INTERRUPT + +module_init(esp_sdio_init); +module_exit(esp_sdio_exit); |