diff options
Diffstat (limited to 'recipes-kernel/linux/linux-at91-5.4.81/mtr/linux-5.4-wl12xx_enable_disable.patch')
-rw-r--r-- | recipes-kernel/linux/linux-at91-5.4.81/mtr/linux-5.4-wl12xx_enable_disable.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-at91-5.4.81/mtr/linux-5.4-wl12xx_enable_disable.patch b/recipes-kernel/linux/linux-at91-5.4.81/mtr/linux-5.4-wl12xx_enable_disable.patch new file mode 100644 index 0000000..ebaadd0 --- /dev/null +++ b/recipes-kernel/linux/linux-at91-5.4.81/mtr/linux-5.4-wl12xx_enable_disable.patch @@ -0,0 +1,43 @@ +From 89ade75d063fec124a6d338d7d332ab2fc4309dd Mon Sep 17 00:00:00 2001 +From: Mykyta Dorokhin <mykyta.dorokhin@globallogic.com> +Date: Mon, 8 Feb 2021 18:30:40 +0200 +Subject: [PATCH] linux-5.4: wl12xx_enable_disable + +--- + drivers/net/wireless/ti/wlcore/sdio.c | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c +index 7afaf35..b03a19c 100644 +--- a/drivers/net/wireless/ti/wlcore/sdio.c ++++ b/drivers/net/wireless/ti/wlcore/sdio.c +@@ -140,8 +140,14 @@ static int wl12xx_sdio_power_on(struct wl12xx_sdio_glue *glue) + struct sdio_func *func = dev_to_sdio_func(glue->dev); + struct mmc_card *card = func->card; + ++ /* Multi-Tech MTR patch: Assert WL_EN (PA27) to enable Wi-Fi */ ++ gpio_set_value(27, 0); ++ msleep(10); ++ gpio_set_value(27, 1); ++ msleep(100); ++ + ret = pm_runtime_get_sync(&card->dev); +- if (ret < 0) { ++ if (ret < 0 && ret != -EACCES) { + pm_runtime_put_noidle(&card->dev); + dev_err(glue->dev, "%s: failed to get_sync(%d)\n", + __func__, ret); +@@ -171,6 +177,10 @@ static int wl12xx_sdio_power_off(struct wl12xx_sdio_glue *glue) + sdio_disable_func(func); + sdio_release_host(func); + ++ /* Multi-Tech MTR patch: De-assert WL_EN (PA27) to disable Wi-Fi */ ++ gpio_set_value(27, 0); ++ msleep(10); ++ + /* Let runtime PM know the card is powered off */ + pm_runtime_put(&card->dev); + return 0; +-- +1.9.1 + |