All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ohad Ben-Cohen <ohad@wizery.com>
To: <linux-wireless@vger.kernel.org>, <linux-mmc@vger.kernel.org>
Cc: <linux-arm-kernel@lists.infradead.org>,
	Luciano Coelho <luciano.coelho@nokia.com>,
	<akpm@linux-foundation.org>, Ido Yariv <ido@wizery.com>,
	San Mehat <san@google.com>,
	Roger Quadros <roger.quadros@nokia.com>,
	Nicolas Pitre <nico@fluxnic.net>,
	Gao Yunpeng <yunpeng.gao@intel.com>,
	Ohad Ben-Cohen <ohad@wizery.com>
Subject: [RFC/PATCH 4/6] sdio: add general runtime PM support
Date: Wed, 11 Aug 2010 16:19:28 +0300	[thread overview]
Message-ID: <1281532770-27545-5-git-send-email-ohad@wizery.com> (raw)
In-Reply-To: <1281532770-27545-1-git-send-email-ohad@wizery.com>

Add generic Runtime PM handlers to sdio.

When a runtime pm event kicks in, those handlers call the
runtime pm handlers of the relevant SDIO function drivers.

Runtime PM is still disabled by default, so this patch alone
has no immediate effect.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
---
 drivers/mmc/core/sdio_bus.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c
index 4a890dc..2e417f9 100644
--- a/drivers/mmc/core/sdio_bus.c
+++ b/drivers/mmc/core/sdio_bus.c
@@ -14,6 +14,7 @@
 #include <linux/device.h>
 #include <linux/err.h>
 #include <linux/slab.h>
+#include <linux/pm_runtime.h>
 
 #include <linux/mmc/card.h>
 #include <linux/mmc/sdio_func.h>
@@ -154,6 +155,14 @@ static int sdio_bus_remove(struct device *dev)
 	return 0;
 }
 
+static const struct dev_pm_ops sdio_bus_pm_ops = {
+	SET_RUNTIME_PM_OPS(
+		pm_generic_runtime_suspend,
+		pm_generic_runtime_resume,
+		pm_generic_runtime_idle
+	)
+};
+
 static struct bus_type sdio_bus_type = {
 	.name		= "sdio",
 	.dev_attrs	= sdio_dev_attrs,
@@ -161,6 +170,7 @@ static struct bus_type sdio_bus_type = {
 	.uevent		= sdio_bus_uevent,
 	.probe		= sdio_bus_probe,
 	.remove		= sdio_bus_remove,
+	.pm		= &sdio_bus_pm_ops,
 };
 
 int sdio_register_bus(void)
-- 
1.7.0.4


WARNING: multiple messages have this Message-ID (diff)
From: Ohad Ben-Cohen <ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org>
To: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Luciano Coelho
	<luciano.coelho-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>,
	akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org,
	Ido Yariv <ido-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org>,
	San Mehat <san-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	Roger Quadros
	<roger.quadros-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>,
	Nicolas Pitre <nico-vtqb6HGKxmzR7s880joybQ@public.gmane.org>,
	Gao Yunpeng <yunpeng.gao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Ohad Ben-Cohen <ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org>
Subject: [RFC/PATCH 4/6] sdio: add general runtime PM support
Date: Wed, 11 Aug 2010 16:19:28 +0300	[thread overview]
Message-ID: <1281532770-27545-5-git-send-email-ohad@wizery.com> (raw)
In-Reply-To: <1281532770-27545-1-git-send-email-ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org>

Add generic Runtime PM handlers to sdio.

When a runtime pm event kicks in, those handlers call the
runtime pm handlers of the relevant SDIO function drivers.

Runtime PM is still disabled by default, so this patch alone
has no immediate effect.

Signed-off-by: Ohad Ben-Cohen <ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org>
---
 drivers/mmc/core/sdio_bus.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c
index 4a890dc..2e417f9 100644
--- a/drivers/mmc/core/sdio_bus.c
+++ b/drivers/mmc/core/sdio_bus.c
@@ -14,6 +14,7 @@
 #include <linux/device.h>
 #include <linux/err.h>
 #include <linux/slab.h>
+#include <linux/pm_runtime.h>
 
 #include <linux/mmc/card.h>
 #include <linux/mmc/sdio_func.h>
@@ -154,6 +155,14 @@ static int sdio_bus_remove(struct device *dev)
 	return 0;
 }
 
+static const struct dev_pm_ops sdio_bus_pm_ops = {
+	SET_RUNTIME_PM_OPS(
+		pm_generic_runtime_suspend,
+		pm_generic_runtime_resume,
+		pm_generic_runtime_idle
+	)
+};
+
 static struct bus_type sdio_bus_type = {
 	.name		= "sdio",
 	.dev_attrs	= sdio_dev_attrs,
@@ -161,6 +170,7 @@ static struct bus_type sdio_bus_type = {
 	.uevent		= sdio_bus_uevent,
 	.probe		= sdio_bus_probe,
 	.remove		= sdio_bus_remove,
+	.pm		= &sdio_bus_pm_ops,
 };
 
 int sdio_register_bus(void)
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: ohad@wizery.com (Ohad Ben-Cohen)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC/PATCH 4/6] sdio: add general runtime PM support
Date: Wed, 11 Aug 2010 16:19:28 +0300	[thread overview]
Message-ID: <1281532770-27545-5-git-send-email-ohad@wizery.com> (raw)
In-Reply-To: <1281532770-27545-1-git-send-email-ohad@wizery.com>

Add generic Runtime PM handlers to sdio.

When a runtime pm event kicks in, those handlers call the
runtime pm handlers of the relevant SDIO function drivers.

Runtime PM is still disabled by default, so this patch alone
has no immediate effect.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
---
 drivers/mmc/core/sdio_bus.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c
index 4a890dc..2e417f9 100644
--- a/drivers/mmc/core/sdio_bus.c
+++ b/drivers/mmc/core/sdio_bus.c
@@ -14,6 +14,7 @@
 #include <linux/device.h>
 #include <linux/err.h>
 #include <linux/slab.h>
+#include <linux/pm_runtime.h>
 
 #include <linux/mmc/card.h>
 #include <linux/mmc/sdio_func.h>
@@ -154,6 +155,14 @@ static int sdio_bus_remove(struct device *dev)
 	return 0;
 }
 
+static const struct dev_pm_ops sdio_bus_pm_ops = {
+	SET_RUNTIME_PM_OPS(
+		pm_generic_runtime_suspend,
+		pm_generic_runtime_resume,
+		pm_generic_runtime_idle
+	)
+};
+
 static struct bus_type sdio_bus_type = {
 	.name		= "sdio",
 	.dev_attrs	= sdio_dev_attrs,
@@ -161,6 +170,7 @@ static struct bus_type sdio_bus_type = {
 	.uevent		= sdio_bus_uevent,
 	.probe		= sdio_bus_probe,
 	.remove		= sdio_bus_remove,
+	.pm		= &sdio_bus_pm_ops,
 };
 
 int sdio_register_bus(void)
-- 
1.7.0.4

  parent reply	other threads:[~2010-08-11 13:19 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-11 13:19 [RFC 0/6] adding SDIO Runtime PM support Ohad Ben-Cohen
2010-08-11 13:19 ` Ohad Ben-Cohen
2010-08-11 13:19 ` Ohad Ben-Cohen
2010-08-11 13:19 ` [RFC/PATCH 1/6] mmc: sdio: fully reconfigure oldcard on resume Ohad Ben-Cohen
2010-08-11 13:19   ` Ohad Ben-Cohen
2010-08-11 13:19   ` Ohad Ben-Cohen
2010-08-11 13:19 ` [RFC/PATCH 2/6] sdio: add power_restore support Ohad Ben-Cohen
2010-08-11 13:19   ` Ohad Ben-Cohen
2010-08-11 13:19   ` Ohad Ben-Cohen
2010-08-11 13:19 ` [RFC/PATCH 3/6] mmc: add general runtime PM support Ohad Ben-Cohen
2010-08-11 13:19   ` Ohad Ben-Cohen
2010-08-11 13:19   ` Ohad Ben-Cohen
2010-08-26  9:42   ` Gao, Yunpeng
2010-08-26  9:42     ` Gao, Yunpeng
2010-09-01 20:08     ` Ohad Ben-Cohen
2010-09-01 20:08       ` Ohad Ben-Cohen
2010-08-11 13:19 ` Ohad Ben-Cohen [this message]
2010-08-11 13:19   ` [RFC/PATCH 4/6] sdio: " Ohad Ben-Cohen
2010-08-11 13:19   ` Ohad Ben-Cohen
2010-08-11 13:19 ` [RFC/PATCH 5/6] sdio: enable Runtime PM for SDIO cards Ohad Ben-Cohen
2010-08-11 13:19   ` Ohad Ben-Cohen
2010-08-11 13:19   ` Ohad Ben-Cohen
2010-08-11 13:19 ` [RFC/PATCH 6/6] wireless: wl1271_sdio: enable Runtime PM Ohad Ben-Cohen
2010-08-11 13:19   ` Ohad Ben-Cohen
2010-08-11 13:19   ` Ohad Ben-Cohen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1281532770-27545-5-git-send-email-ohad@wizery.com \
    --to=ohad@wizery.com \
    --cc=akpm@linux-foundation.org \
    --cc=ido@wizery.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luciano.coelho@nokia.com \
    --cc=nico@fluxnic.net \
    --cc=roger.quadros@nokia.com \
    --cc=san@google.com \
    --cc=yunpeng.gao@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.