linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFT][PATCH 00/12] change drivers power management to use dev_pm_ops
@ 2014-02-10 16:12 Shuah Khan
  2014-02-10 16:12 ` [RFT][PATCH 05/12] mmc: change au1xmmc platform " Shuah Khan
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Shuah Khan @ 2014-02-10 16:12 UTC (permalink / raw)
  To: rjw
  Cc: Shuah Khan, linux-pm, linux-kernel, linux, linux-arm-kernel, benh,
	linuxppc-dev, manuel.lauss, chris, linux-mmc, sonic.zhang,
	adi-buildroot-devel, mirq-linux, davidb, dwalker, linux-arm-msm,
	ian, gregkh, linux-pcmcia, ingo.tuchscherer, linux390,
	schwidefsky, heiko.carstens, linux-s390, shuahkhan

Change drivers to register pm ops using dev_pm_ops instead of legacy pm_ops.
.pm hooks call existing legacy suspend and resume interfaces by passing in
the right pm state. Bus drivers suspend and resume routines call .pm driver
hooks if found.

Shuah Khan (12):
  arm: change locomo platform and bus power management to use
    dev_pm_ops
  arm: change sa1111 platform and bus power management to use
    dev_pm_ops
  arm: change scoop platform power management to use dev_pm_ops
  drivers/macintosh/adb: change platform power managemnet to use
    dev_pm_ops
  mmc: change au1xmmc platform power management to use dev_pm_ops
  mmc: change bfin_sdh platform power management to use dev_pm_ops
  isa: change isa bus power managemnet to use dev_pm_ops
  mmc: change cb710-mmc platform power management to use dev_pm_ops
  mmc: change msm_sdcc platform power management to use dev_pm_ops
  mmc: change tmio_mmc platform power management to use dev_pm_ops
  drivers/pcmcia: change ds driver power management to use dev_pm_ops
  drivers/s390/crypto: change ap_bus driver power management to use
    dev_pm_ops

 arch/arm/common/locomo.c     |   93 +++++++++++++++++++++++++++++++++++-------
 arch/arm/common/sa1111.c     |   88 +++++++++++++++++++++++++++++++--------
 arch/arm/common/scoop.c      |   44 ++++++++++++++++----
 drivers/base/isa.c           |   30 ++++++++++++--
 drivers/macintosh/adb.c      |   41 ++++++++++++++++---
 drivers/mmc/host/au1xmmc.c   |   43 +++++++++++++++----
 drivers/mmc/host/bfin_sdh.c  |   40 +++++++++++++++---
 drivers/mmc/host/cb710-mmc.c |   37 +++++++++++++++--
 drivers/mmc/host/msm_sdcc.c  |   42 +++++++++++++++----
 drivers/mmc/host/tmio_mmc.c  |   42 +++++++++++++++----
 drivers/pcmcia/ds.c          |   36 +++++++++++++---
 drivers/s390/crypto/ap_bus.c |   30 ++++++++++++--
 12 files changed, 481 insertions(+), 85 deletions(-)

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [RFT][PATCH 05/12] mmc: change au1xmmc platform power management to use dev_pm_ops
  2014-02-10 16:12 [RFT][PATCH 00/12] change drivers power management to use dev_pm_ops Shuah Khan
@ 2014-02-10 16:12 ` Shuah Khan
  2014-02-10 16:12 ` [RFT][PATCH 06/12] mmc: change bfin_sdh " Shuah Khan
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Shuah Khan @ 2014-02-10 16:12 UTC (permalink / raw)
  To: rjw, manuel.lauss, chris
  Cc: Shuah Khan, linux-pm, linux-kernel, linux-mmc, shuahkhan

Change au1xmmc platform driver to register pm ops using dev_pm_ops instead of
legacy pm_ops. .pm hooks call existing legacy suspend and resume interfaces
by passing in the right pm state.

Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
---
 drivers/mmc/host/au1xmmc.c |   43 +++++++++++++++++++++++++++++++++++--------
 1 file changed, 35 insertions(+), 8 deletions(-)

diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c
index f5443a6..1601f39 100644
--- a/drivers/mmc/host/au1xmmc.c
+++ b/drivers/mmc/host/au1xmmc.c
@@ -1154,7 +1154,7 @@ static int au1xmmc_remove(struct platform_device *pdev)
 }
 
 #ifdef CONFIG_PM
-static int au1xmmc_suspend(struct platform_device *pdev, pm_message_t state)
+static int __au1xmmc_suspend(struct platform_device *pdev, pm_message_t state)
 {
 	struct au1xmmc_host *host = platform_get_drvdata(pdev);
 
@@ -1167,7 +1167,22 @@ static int au1xmmc_suspend(struct platform_device *pdev, pm_message_t state)
 	return 0;
 }
 
-static int au1xmmc_resume(struct platform_device *pdev)
+static int au1xmmc_suspend(struct device *dev)
+{
+	return __au1xmmc_suspend(to_platform_device(dev), PMSG_SUSPEND);
+}
+
+static int au1xmmc_freeze(struct device *dev)
+{
+	return __au1xmmc_suspend(to_platform_device(dev), PMSG_FREEZE);
+}
+
+static int au1xmmc_poweroff(struct device *dev)
+{
+	return __au1xmmc_suspend(to_platform_device(dev), PMSG_HIBERNATE);
+}
+
+static int __au1xmmc_resume(struct platform_device *pdev)
 {
 	struct au1xmmc_host *host = platform_get_drvdata(pdev);
 
@@ -1175,19 +1190,31 @@ static int au1xmmc_resume(struct platform_device *pdev)
 
 	return 0;
 }
-#else
-#define au1xmmc_suspend NULL
-#define au1xmmc_resume NULL
-#endif
 
+static int au1xmmc_resume(struct device *dev)
+{
+	return __au1xmmc_resume(to_platform_device(dev));
+}
+
+static const struct dev_pm_ops au1xmmc_dev_pm_ops = {
+	.suspend = au1xmmc_suspend,
+	.resume = au1xmmc_resume,
+	/* Hibernate hooks */
+	.freeze = au1xmmc_freeze,
+	.thaw = au1xmmc_resume,
+	.poweroff = au1xmmc_poweroff,
+	.restore = au1xmmc_resume,
+};
+#endif
 static struct platform_driver au1xmmc_driver = {
 	.probe         = au1xmmc_probe,
 	.remove        = au1xmmc_remove,
-	.suspend       = au1xmmc_suspend,
-	.resume        = au1xmmc_resume,
 	.driver        = {
 		.name  = DRIVER_NAME,
 		.owner = THIS_MODULE,
+#ifdef CONFIG_PM
+		.pm    = &au1xmmc_dev_pm_ops,
+#endif
 	},
 };
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [RFT][PATCH 06/12] mmc: change bfin_sdh platform power management to use dev_pm_ops
  2014-02-10 16:12 [RFT][PATCH 00/12] change drivers power management to use dev_pm_ops Shuah Khan
  2014-02-10 16:12 ` [RFT][PATCH 05/12] mmc: change au1xmmc platform " Shuah Khan
@ 2014-02-10 16:12 ` Shuah Khan
  2014-02-10 16:12 ` [RFT][PATCH 08/12] mmc: change cb710-mmc " Shuah Khan
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Shuah Khan @ 2014-02-10 16:12 UTC (permalink / raw)
  To: rjw, sonic.zhang, chris
  Cc: Shuah Khan, linux-pm, linux-kernel, adi-buildroot-devel,
	linux-mmc, shuahkhan

Change bfin_sdh platform driver to register pm ops using dev_pm_ops instead
of legacy pm_ops. .pm hooks call existing legacy suspend and resume interfaces
by passing in the right pm state.

Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
---
 drivers/mmc/host/bfin_sdh.c |   40 +++++++++++++++++++++++++++++++++++-----
 1 file changed, 35 insertions(+), 5 deletions(-)

diff --git a/drivers/mmc/host/bfin_sdh.c b/drivers/mmc/host/bfin_sdh.c
index 2b7f37e..d69f223 100644
--- a/drivers/mmc/host/bfin_sdh.c
+++ b/drivers/mmc/host/bfin_sdh.c
@@ -637,7 +637,7 @@ static int sdh_remove(struct platform_device *pdev)
 }
 
 #ifdef CONFIG_PM
-static int sdh_suspend(struct platform_device *dev, pm_message_t state)
+static int __sdh_suspend(struct platform_device *dev, pm_message_t state)
 {
 	struct bfin_sd_host *drv_data = get_sdh_data(dev);
 
@@ -646,7 +646,22 @@ static int sdh_suspend(struct platform_device *dev, pm_message_t state)
 	return 0;
 }
 
-static int sdh_resume(struct platform_device *dev)
+static int sdh_suspend(struct device *dev)
+{
+	return	__sdh_suspend(to_platform_device(dev), PMSG_SUSPEND);
+}
+
+static int sdh_freeze(struct device *dev)
+{
+	return	__sdh_suspend(to_platform_device(dev), PMSG_FREEZE);
+}
+
+static int sdh_poweroff(struct device *dev)
+{
+	return	__sdh_suspend(to_platform_device(dev), PMSG_HIBERNATE);
+}
+
+static int __sdh_resume(struct platform_device *dev)
 {
 	struct bfin_sd_host *drv_data = get_sdh_data(dev);
 	int ret = 0;
@@ -660,9 +675,21 @@ static int sdh_resume(struct platform_device *dev)
 	sdh_reset();
 	return ret;
 }
-#else
-# define sdh_suspend NULL
-# define sdh_resume  NULL
+
+static int sdh_resume(struct device *dev)
+{
+	return __sdh_resume(to_platform_device(dev));
+}
+
+static const struct dev_pm_ops sdh_dev_pm_ops = {
+	.suspend = sdh_suspend,
+	.resume = sdh_resume,
+	/* Hibernate hooks */
+	.freeze = sdh_freeze,
+	.thaw = sdh_resume,
+	.poweroff = sdh_poweroff,
+	.restore = sdh_resume,
+};
 #endif
 
 static struct platform_driver sdh_driver = {
@@ -672,6 +699,9 @@ static struct platform_driver sdh_driver = {
 	.resume  = sdh_resume,
 	.driver  = {
 		.name = DRIVER_NAME,
+#ifdef CONFIG_PM
+		.pm = &sdh_dev_pm_ops,
+#endif
 	},
 };
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [RFT][PATCH 08/12] mmc: change cb710-mmc platform power management to use dev_pm_ops
  2014-02-10 16:12 [RFT][PATCH 00/12] change drivers power management to use dev_pm_ops Shuah Khan
  2014-02-10 16:12 ` [RFT][PATCH 05/12] mmc: change au1xmmc platform " Shuah Khan
  2014-02-10 16:12 ` [RFT][PATCH 06/12] mmc: change bfin_sdh " Shuah Khan
@ 2014-02-10 16:12 ` Shuah Khan
  2014-02-10 23:49   ` Michał Mirosław
  2014-02-10 16:12 ` [RFT][PATCH 09/12] mmc: change msm_sdcc " Shuah Khan
  2014-02-10 16:15 ` [RFT][PATCH 10/12] mmc: change tmio_mmc " Shuah Khan
  4 siblings, 1 reply; 8+ messages in thread
From: Shuah Khan @ 2014-02-10 16:12 UTC (permalink / raw)
  To: rjw, mirq-linux, chris
  Cc: Shuah Khan, linux-pm, linux-kernel, linux-mmc, shuahkhan

Change cb710-mmc platform driver to register pm ops using dev_pm_ops instead
of legacy pm_ops. .pm hooks call existing legacy suspend and resume interfaces
by passing in the right pm state.

Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
---
 drivers/mmc/host/cb710-mmc.c |   37 +++++++++++++++++++++++++++++++++----
 1 file changed, 33 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/cb710-mmc.c b/drivers/mmc/host/cb710-mmc.c
index 1087b4c..00fd93f 100644
--- a/drivers/mmc/host/cb710-mmc.c
+++ b/drivers/mmc/host/cb710-mmc.c
@@ -664,7 +664,7 @@ static const struct mmc_host_ops cb710_mmc_host = {
 
 #ifdef CONFIG_PM
 
-static int cb710_mmc_suspend(struct platform_device *pdev, pm_message_t state)
+static int __cb710_mmc_suspend(struct platform_device *pdev, pm_message_t state)
 {
 	struct cb710_slot *slot = cb710_pdev_to_slot(pdev);
 
@@ -672,7 +672,22 @@ static int cb710_mmc_suspend(struct platform_device *pdev, pm_message_t state)
 	return 0;
 }
 
-static int cb710_mmc_resume(struct platform_device *pdev)
+static int cb710_mmc_suspend(struct device *dev)
+{
+	return __cb710_mmc_suspend(to_platform_device(dev), PMSG_SUSPEND);
+}
+
+static int cb710_mmc_freeze(struct device *dev)
+{
+	return __cb710_mmc_suspend(to_platform_device(dev), PMSG_FREEZE);
+}
+
+static int cb710_mmc_poweroff(struct device *dev)
+{
+	return __cb710_mmc_suspend(to_platform_device(dev), PMSG_HIBERNATE);
+}
+
+static int __cb710_mmc_resume(struct platform_device *pdev)
 {
 	struct cb710_slot *slot = cb710_pdev_to_slot(pdev);
 
@@ -680,6 +695,10 @@ static int cb710_mmc_resume(struct platform_device *pdev)
 	return 0;
 }
 
+static int cb710_mmc_resume(struct device *dev)
+{
+	return __cb710_mmc_resume(to_platform_device(dev));
+}
 #endif /* CONFIG_PM */
 
 static int cb710_mmc_init(struct platform_device *pdev)
@@ -762,13 +781,23 @@ static int cb710_mmc_exit(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_PM
+static const struct dev_pm_ops cb710_mmc_dev_pm_ops = {
+	.suspend = cb710_mmc_suspend,
+	.resume = cb710_mmc_resume,
+	/* Hibernate hooks */
+	.freeze = cb710_mmc_freeze,
+	.thaw = cb710_mmc_resume,
+	.poweroff = cb710_mmc_poweroff,
+	.restore = cb710_mmc_resume,
+};
+#endif
 static struct platform_driver cb710_mmc_driver = {
 	.driver.name = "cb710-mmc",
 	.probe = cb710_mmc_init,
 	.remove = cb710_mmc_exit,
 #ifdef CONFIG_PM
-	.suspend = cb710_mmc_suspend,
-	.resume = cb710_mmc_resume,
+	.driver.pm = &cb710_mmc_dev_pm_ops,
 #endif
 };
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [RFT][PATCH 09/12] mmc: change msm_sdcc platform power management to use dev_pm_ops
  2014-02-10 16:12 [RFT][PATCH 00/12] change drivers power management to use dev_pm_ops Shuah Khan
                   ` (2 preceding siblings ...)
  2014-02-10 16:12 ` [RFT][PATCH 08/12] mmc: change cb710-mmc " Shuah Khan
@ 2014-02-10 16:12 ` Shuah Khan
  2014-02-10 16:15 ` [RFT][PATCH 10/12] mmc: change tmio_mmc " Shuah Khan
  4 siblings, 0 replies; 8+ messages in thread
From: Shuah Khan @ 2014-02-10 16:12 UTC (permalink / raw)
  To: rjw, davidb, dwalker, bryanh, chris
  Cc: Shuah Khan, linux-pm, linux-kernel, linux-arm-msm, linux-mmc,
	shuahkhan

Change msm_sdcc platform driver to register pm ops using dev_pm_ops instead of
legacy pm_ops. .pm hooks call existing legacy suspend and resume interfaces
by passing in the right pm state.

Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
---
 drivers/mmc/host/msm_sdcc.c |   42 +++++++++++++++++++++++++++++++++++-------
 1 file changed, 35 insertions(+), 7 deletions(-)

diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c
index 9405ecd..311e32a 100644
--- a/drivers/mmc/host/msm_sdcc.c
+++ b/drivers/mmc/host/msm_sdcc.c
@@ -1417,7 +1417,7 @@ ioremap_free:
 
 #ifdef CONFIG_PM
 static int
-msmsdcc_suspend(struct platform_device *dev, pm_message_t state)
+__msmsdcc_suspend(struct platform_device *dev, pm_message_t state)
 {
 	struct mmc_host *mmc = mmc_get_drvdata(dev);
 
@@ -1434,8 +1434,23 @@ msmsdcc_suspend(struct platform_device *dev, pm_message_t state)
 	return 0;
 }
 
+static int msmsdcc_suspend(struct device *dev)
+{
+	return __msmsdcc_suspend(to_platform_device(dev), PMSG_SUSPEND);
+}
+
+static int msmsdcc_freeze(struct device *dev)
+{
+	return __msmsdcc_suspend(to_platform_device(dev), PMSG_FREEZE);
+}
+
+static int msmsdcc_poweroff(struct device *dev)
+{
+	return __msmsdcc_suspend(to_platform_device(dev), PMSG_HIBERNATE);
+}
+
 static int
-msmsdcc_resume(struct platform_device *dev)
+__msmsdcc_resume(struct platform_device *dev)
 {
 	struct mmc_host *mmc = mmc_get_drvdata(dev);
 
@@ -1454,17 +1469,30 @@ msmsdcc_resume(struct platform_device *dev)
 	}
 	return 0;
 }
-#else
-#define msmsdcc_suspend	0
-#define msmsdcc_resume 0
+
+static int msmsdcc_resume(struct device *dev)
+{
+	return __msmsdcc_resume(to_platform_device(dev));
+}
+
+static const struct dev_pm_ops msmsdcc_dev_pm_ops = {
+	.suspend = msmsdcc_suspend,
+	.resume = msmsdcc_resume,
+	/* Hibernate hooks */
+	.freeze = msmsdcc_freeze,
+	.thaw = msmsdcc_resume,
+	.poweroff = msmsdcc_poweroff,
+	.restore = msmsdcc_resume,
+};
 #endif
 
 static struct platform_driver msmsdcc_driver = {
 	.probe		= msmsdcc_probe,
-	.suspend	= msmsdcc_suspend,
-	.resume		= msmsdcc_resume,
 	.driver		= {
 		.name	= "msm_sdcc",
+#ifdef CONFIG_PM
+		.pm	= &msmsdcc_dev_pm_ops,
+#endif
 	},
 };
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [RFT][PATCH 10/12] mmc: change tmio_mmc platform power management to use dev_pm_ops
  2014-02-10 16:12 [RFT][PATCH 00/12] change drivers power management to use dev_pm_ops Shuah Khan
                   ` (3 preceding siblings ...)
  2014-02-10 16:12 ` [RFT][PATCH 09/12] mmc: change msm_sdcc " Shuah Khan
@ 2014-02-10 16:15 ` Shuah Khan
  4 siblings, 0 replies; 8+ messages in thread
From: Shuah Khan @ 2014-02-10 16:15 UTC (permalink / raw)
  To: rjw, ian, chris; +Cc: Shuah Khan, linux-pm, linux-kernel, linux-mmc, shuahkhan

Change tmio_mmc platform driver to register pm ops using dev_pm_ops instead
of legacy pm_ops. .pm hooks call existing legacy suspend and resume interfaces
by passing in the right pm state.

Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
---
 drivers/mmc/host/tmio_mmc.c |   42 +++++++++++++++++++++++++++++++++++-------
 1 file changed, 35 insertions(+), 7 deletions(-)

diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c
index 1900abb..e9b0a06 100644
--- a/drivers/mmc/host/tmio_mmc.c
+++ b/drivers/mmc/host/tmio_mmc.c
@@ -24,7 +24,7 @@
 #include "tmio_mmc.h"
 
 #ifdef CONFIG_PM
-static int tmio_mmc_suspend(struct platform_device *dev, pm_message_t state)
+static int __tmio_mmc_suspend(struct platform_device *dev, pm_message_t state)
 {
 	const struct mfd_cell *cell = mfd_get_cell(dev);
 	int ret;
@@ -38,7 +38,22 @@ static int tmio_mmc_suspend(struct platform_device *dev, pm_message_t state)
 	return ret;
 }
 
-static int tmio_mmc_resume(struct platform_device *dev)
+static int tmio_mmc_suspend(struct device *dev)
+{
+	return __tmio_mmc_suspend(to_platform_device(dev), PMSG_SUSPEND);
+}
+
+static int tmio_mmc_freeze(struct device *dev)
+{
+	return __tmio_mmc_suspend(to_platform_device(dev), PMSG_FREEZE);
+}
+
+static int tmio_mmc_poweroff(struct device *dev)
+{
+	return __tmio_mmc_suspend(to_platform_device(dev), PMSG_HIBERNATE);
+}
+
+static int __tmio_mmc_resume(struct platform_device *dev)
 {
 	const struct mfd_cell *cell = mfd_get_cell(dev);
 	int ret = 0;
@@ -52,9 +67,21 @@ static int tmio_mmc_resume(struct platform_device *dev)
 
 	return ret;
 }
-#else
-#define tmio_mmc_suspend NULL
-#define tmio_mmc_resume NULL
+
+static int tmio_mmc_resume(struct device *dev)
+{
+	return __tmio_mmc_resume(to_platform_device(dev));
+}
+
+static const struct dev_pm_ops tmio_mmc_dev_pm_ops = {
+	.suspend = tmio_mmc_suspend,
+	.resume = tmio_mmc_resume,
+	/* Hibernate hooks */
+	.freeze = tmio_mmc_freeze,
+	.thaw = tmio_mmc_resume,
+	.poweroff = tmio_mmc_poweroff,
+	.restore = tmio_mmc_resume,
+};
 #endif
 
 static int tmio_mmc_probe(struct platform_device *pdev)
@@ -138,11 +165,12 @@ static struct platform_driver tmio_mmc_driver = {
 	.driver = {
 		.name = "tmio-mmc",
 		.owner = THIS_MODULE,
+#ifdef CONFIG_PM
+		.pm = &tmio_mmc_dev_pm_ops,
+#endif
 	},
 	.probe = tmio_mmc_probe,
 	.remove = tmio_mmc_remove,
-	.suspend = tmio_mmc_suspend,
-	.resume = tmio_mmc_resume,
 };
 
 module_platform_driver(tmio_mmc_driver);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [RFT][PATCH 08/12] mmc: change cb710-mmc platform power management to use dev_pm_ops
  2014-02-10 16:12 ` [RFT][PATCH 08/12] mmc: change cb710-mmc " Shuah Khan
@ 2014-02-10 23:49   ` Michał Mirosław
  2014-02-11 15:38     ` Shuah Khan
  0 siblings, 1 reply; 8+ messages in thread
From: Michał Mirosław @ 2014-02-10 23:49 UTC (permalink / raw)
  To: Shuah Khan; +Cc: rjw, chris, linux-pm, linux-kernel, linux-mmc, shuahkhan

On Mon, Feb 10, 2014 at 09:12:31AM -0700, Shuah Khan wrote:
> Change cb710-mmc platform driver to register pm ops using dev_pm_ops instead
> of legacy pm_ops. .pm hooks call existing legacy suspend and resume interfaces
> by passing in the right pm state.
[all the patch cut]

Aaah, a bit mechanical - this change, isn't it?

The suspend/resume callbacks just clears IRQ mask in the device in case it
got undefined during sleep state. So the proper change here is to squash all
the functions in one, and point all of the hooks to it.

With the change you have my ack.

BTW, you could move cb710_mmc_suspend() (or whatever you'll call it) to one
ifdef block with cb710_mmc_dev_pm_ops.

Best Regards,
Michał Mirosław

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFT][PATCH 08/12] mmc: change cb710-mmc platform power management to use dev_pm_ops
  2014-02-10 23:49   ` Michał Mirosław
@ 2014-02-11 15:38     ` Shuah Khan
  0 siblings, 0 replies; 8+ messages in thread
From: Shuah Khan @ 2014-02-11 15:38 UTC (permalink / raw)
  To: Michał Mirosław
  Cc: rjw, chris, linux-pm, linux-kernel, linux-mmc, shuahkhan,
	Shuah Khan

On 02/10/2014 04:49 PM, Michał Mirosław wrote:
> On Mon, Feb 10, 2014 at 09:12:31AM -0700, Shuah Khan wrote:
>> Change cb710-mmc platform driver to register pm ops using dev_pm_ops instead
>> of legacy pm_ops. .pm hooks call existing legacy suspend and resume interfaces
>> by passing in the right pm state.
> [all the patch cut]
>
> Aaah, a bit mechanical - this change, isn't it?

Yes :)

>
> The suspend/resume callbacks just clears IRQ mask in the device in case it
> got undefined during sleep state. So the proper change here is to squash all
> the functions in one, and point all of the hooks to it.
>
> With the change you have my ack.
>
> BTW, you could move cb710_mmc_suspend() (or whatever you'll call it) to one
> ifdef block with cb710_mmc_dev_pm_ops.
>

It makes perfect sense to squash suspend and resume. Thanks for the 
review. Code looks lot simpler now. Will send v2 patch shortly.

-- Shuah

-- 
Shuah Khan
Senior Linux Kernel Developer - Open Source Group
Samsung Research America(Silicon Valley)
shuah.kh@samsung.com | (970) 672-0658

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-02-11 15:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-10 16:12 [RFT][PATCH 00/12] change drivers power management to use dev_pm_ops Shuah Khan
2014-02-10 16:12 ` [RFT][PATCH 05/12] mmc: change au1xmmc platform " Shuah Khan
2014-02-10 16:12 ` [RFT][PATCH 06/12] mmc: change bfin_sdh " Shuah Khan
2014-02-10 16:12 ` [RFT][PATCH 08/12] mmc: change cb710-mmc " Shuah Khan
2014-02-10 23:49   ` Michał Mirosław
2014-02-11 15:38     ` Shuah Khan
2014-02-10 16:12 ` [RFT][PATCH 09/12] mmc: change msm_sdcc " Shuah Khan
2014-02-10 16:15 ` [RFT][PATCH 10/12] mmc: change tmio_mmc " Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).