From 90f57378fbfacd0ed0e6e11f02b1e60fab784518 Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 4 Jun 2018 10:21:29 -0500 Subject: Add mtr stuff to mLinux --- .../mtrv1/linux-3.12-wl12xx-set-power.patch | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 recipes-kernel/linux/linux-3.12.70/mtrv1/linux-3.12-wl12xx-set-power.patch (limited to 'recipes-kernel/linux/linux-3.12.70/mtrv1/linux-3.12-wl12xx-set-power.patch') 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: -- cgit v1.2.3