summaryrefslogtreecommitdiff
path: root/recipes-kernel/linux/linux-3.12.70/mtrv1/linux-3.12-wl12xx-set-power.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-3.12.70/mtrv1/linux-3.12-wl12xx-set-power.patch')
-rw-r--r--recipes-kernel/linux/linux-3.12.70/mtrv1/linux-3.12-wl12xx-set-power.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-3.12.70/mtrv1/linux-3.12-wl12xx-set-power.patch b/recipes-kernel/linux/linux-3.12.70/mtrv1/linux-3.12-wl12xx-set-power.patch
new file mode 100644
index 0000000..fb8cf6e
--- /dev/null
+++ b/recipes-kernel/linux/linux-3.12.70/mtrv1/linux-3.12-wl12xx-set-power.patch
@@ -0,0 +1,42 @@
+diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c
+index 29ef249..fba2e1b 100644
+--- a/drivers/net/wireless/ti/wlcore/sdio.c
++++ b/drivers/net/wireless/ti/wlcore/sdio.c
+@@ -52,6 +52,7 @@ static bool dump = false;
+ struct wl12xx_sdio_glue {
+ struct device *dev;
+ struct platform_device *core;
++ void (*set_power)(bool enable);
+ };
+
+ static const struct sdio_device_id wl1271_devices[] = {
+@@ -153,6 +154,9 @@ 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;
+
++ if (glue->set_power)
++ glue->set_power(1);
++
+ ret = pm_runtime_get_sync(&card->dev);
+ if (ret) {
+ /*
+@@ -181,6 +185,9 @@ static int wl12xx_sdio_power_off(struct wl12xx_sdio_glue *glue)
+ struct sdio_func *func = dev_to_sdio_func(glue->dev);
+ struct mmc_card *card = func->card;
+
++ if (glue->set_power)
++ glue->set_power(0);
++
+ sdio_claim_host(func);
+ sdio_disable_func(func);
+ sdio_release_host(func);
+@@ -311,6 +318,9 @@ static int wl1271_probe(struct sdio_func *func,
+ dev_err(glue->dev, "can't add platform device\n");
+ goto out_dev_put;
+ }
++
++ glue->set_power = pdev_data->pdata->set_power;
++
+ return 0;
+
+ out_dev_put: