>From ca5da652071719c9047fee1d103fd4f0fe33f5e3 Mon Sep 17 00:00:00 2001
From: Ohad Ben-Cohen <[email protected]>
Date: Fri, 8 Oct 2010 16:16:27 +0300
Subject: [PATCH 25/26] wl1271: sdio: add suspend/resume support

Add required suspend/resume support to prevent the SDIO
core from removing our card completely during system suspend.

Signed-off-by: Ohad Ben-Cohen <[email protected]>
Tested-by: Luciano Coelho <[email protected]>
Signed-off-by: Luciano Coelho <[email protected]>
Signed-off-by: Claude Brouat <[email protected]>
---
 drivers/net/wireless/wl12xx/wl1271_sdio.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/wl12xx/wl1271_sdio.c 
b/drivers/net/wireless/wl12xx/wl1271_sdio.c
index f8252af..7a9e1a3 100644
--- a/drivers/net/wireless/wl12xx/wl1271_sdio.c
+++ b/drivers/net/wireless/wl12xx/wl1271_sdio.c
@@ -293,11 +293,31 @@ static void __devexit wl1271_remove(struct sdio_func 
*func)
     wl1271_free_hw(wl);
 }

+static int wl1271_suspend(struct device *dev)
+{
+    /* Tell MMC/SDIO core it's OK to power down the card
+    * (if it isn't already), but not to remove it completely */
+    return 0;
+}
+
+static int wl1271_resume(struct device *dev)
+{
+    return 0;
+}
+
+static const struct dev_pm_ops wl1271_sdio_pm_ops = {
+    .suspend   = wl1271_suspend,
+    .resume         = wl1271_resume,
+};
+
 static struct sdio_driver wl1271_sdio_driver = {
     .name      = "wl1271_sdio",
     .id_table  = wl1271_devices,
     .probe          = wl1271_probe,
     .remove         = __devexit_p(wl1271_remove),
+    .drv = {
+          .pm = &wl1271_sdio_pm_ops,
+    },
 };

 static int __init wl1271_init(void)
--
1.6.3.3




Claude BROUAT
UMG/MIPE/WSIV  System Integrator
Office:    +33 (0)1 72 21 04 54
mailto: mailto:[email protected]

Intel Corp. SAS
134, av du Général Eisenhower
BP 73586
31100 TOULOUSE
France



---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

Attachment: 0025-wl1271-sdio-add-suspend-resume-support.patch
Description: 0025-wl1271-sdio-add-suspend-resume-support.patch

_______________________________________________
Meego-kernel mailing list
[email protected]
http://lists.meego.com/listinfo/meego-kernel

Reply via email to