public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel•com>
To: "Rafael J. Wysocki" <rjw@sisk•pl>
Cc: Magnus Damm <magnus.damm@gmail•com>,
	linux-kernel@vger•kernel.org, gregkh@suse•de, pavel@ucw•cz,
	hskinnemoen@atmel•com, anemo@mba•ocn.ne.jp,
	linux-usb@vger•kernel.org, akpm@linux-foundation•org,
	stern@rowland•harvard.edu, ben-linux@fluff•org,
	linux-omap@vger•kernel.org, linux-pm@lists•linux-foundation.org,
	felipe.balbi@nokia•com, nicolas.ferre@atmel•com,
	linux-next@vger•kernel.org
Subject: Re: [PATCH 00/07] pm: remove late/early platform driver pm callbacks V2
Date: Tue, 8 Sep 2009 18:25:55 -0700	[thread overview]
Message-ID: <e9c3a7c20909081825i1578a522w5d7f4e5d678b5d74@mail.gmail.com> (raw)
In-Reply-To: <200907050145.15122.rjw@sisk.pl>

[-- Attachment #1: Type: text/plain, Size: 1373 bytes --]

2009/7/4 Rafael J. Wysocki <rjw@sisk•pl>:
> On Wednesday 24 June 2009, Magnus Damm wrote:
>> pm: remove late/early platform driver pm callbacks V2
>>
>> [PATCH 01/07] arm: rework omap suspend_late()/resume_early()
>> [PATCH 02/07] dma: rework dw_dmac suspend_late()/resume_early()
>> [PATCH 03/07] dma: rework txx9dmac suspend_late()/resume_early()
>> [PATCH 04/07] i2c: rework i2c-pxa suspend_late()/resume_early()
>> [PATCH 05/07] i2c: rework i2c-s3c2410 suspend_late()/resume() V2
>> [PATCH 06/07] usb: rework musb suspend()/resume_early()
>> [PATCH 07/07] pm: remove platform device suspend_late()/resume_early() V2
>>
>> These patches simply remove ->suspend_late() and ->resume_early()
>> from struct platform_driver. Drivers are converted to dev_pm_ops
>> with CONFIG_SUSPEND in mind. Untested.
>>
>> All patches except [02/07] are known to compile.
>>
>> Signed-off-by: Magnus Damm <damm@igel•co.jp>
[..]
>
> The series is now in the linux-next branch of the suspend-2.6 tree.  I'll move
> it into the for-linus branch, which is not rebased, if the patches are not
> reported to cause any problems in the next few days.
>

Hi,

My linux-next test builds for drivers/dma/ caught a missed conversion
of the at_hdmac driver.  Please check the attached fix (compile tested
only) and include it in this series.

Thanks and regards,
Dan

[-- Attachment #2: at-hdmac-rework-suspend.patch --]
[-- Type: application/octet-stream, Size: 2119 bytes --]

at_hdmac: Rework suspend_late()/resume_early()

From: Dan Williams <dan.j.williams@intel•com>

This patch reworks platform driver power management code
for at_hdmac from legacy late/early callbacks to dev_pm_ops.

The callbacks are converted for CONFIG_SUSPEND like this:
  suspend_late() -> suspend_noirq()
  resume_early() -> resume_noirq()

Cc: Magnus Damm <damm@igel•co.jp>
Cc: Greg Kroah-Hartman <gregkh@suse•de>
Cc: Pavel Machek <pavel@ucw•cz>
Cc: Rafael J. Wysocki <rjw@sisk•pl>
Cc: Nicolas Ferre <nicolas.ferre@atmel•com>
Signed-off-by: Dan Williams <dan.j.williams@intel•com>
---
 drivers/dma/at_hdmac.c |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
index 0aeb578..7585c41 100644
--- a/drivers/dma/at_hdmac.c
+++ b/drivers/dma/at_hdmac.c
@@ -1168,32 +1168,37 @@ static void at_dma_shutdown(struct platform_device *pdev)
 	clk_disable(atdma->clk);
 }
 
-static int at_dma_suspend_late(struct platform_device *pdev, pm_message_t mesg)
+static int at_dma_suspend_noirq(struct device *dev)
 {
-	struct at_dma	*atdma = platform_get_drvdata(pdev);
+	struct platform_device *pdev = to_platform_device(dev);
+	struct at_dma *atdma = platform_get_drvdata(pdev);
 
 	at_dma_off(platform_get_drvdata(pdev));
 	clk_disable(atdma->clk);
 	return 0;
 }
 
-static int at_dma_resume_early(struct platform_device *pdev)
+static int at_dma_resume_noirq(struct device *dev)
 {
-	struct at_dma	*atdma = platform_get_drvdata(pdev);
+	struct platform_device *pdev = to_platform_device(dev);
+	struct at_dma *atdma = platform_get_drvdata(pdev);
 
 	clk_enable(atdma->clk);
 	dma_writel(atdma, EN, AT_DMA_ENABLE);
 	return 0;
-
 }
 
+static struct dev_pm_ops at_dma_dev_pm_ops = {
+	.suspend_noirq = at_dma_suspend_noirq,
+	.resume_noirq = at_dma_resume_noirq,
+};
+
 static struct platform_driver at_dma_driver = {
 	.remove		= __exit_p(at_dma_remove),
 	.shutdown	= at_dma_shutdown,
-	.suspend_late	= at_dma_suspend_late,
-	.resume_early	= at_dma_resume_early,
 	.driver = {
 		.name	= "at_hdmac",
+		.pm	= &at_dma_dev_pm_ops,
 	},
 };
 

       reply	other threads:[~2009-09-09  1:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090624092306.14276.127.sendpatchset@rx1.opensource.se>
     [not found] ` <200907050145.15122.rjw@sisk.pl>
2009-09-09  1:25   ` Dan Williams [this message]
2009-09-09 22:09     ` [PATCH 00/07] pm: remove late/early platform driver pm callbacks V2 Rafael J. Wysocki

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=e9c3a7c20909081825i1578a522w5d7f4e5d678b5d74@mail.gmail.com \
    --to=dan.j.williams@intel$(echo .)com \
    --cc=akpm@linux-foundation$(echo .)org \
    --cc=anemo@mba$(echo .)ocn.ne.jp \
    --cc=ben-linux@fluff$(echo .)org \
    --cc=felipe.balbi@nokia$(echo .)com \
    --cc=gregkh@suse$(echo .)de \
    --cc=hskinnemoen@atmel$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=linux-omap@vger$(echo .)kernel.org \
    --cc=linux-pm@lists$(echo .)linux-foundation.org \
    --cc=linux-usb@vger$(echo .)kernel.org \
    --cc=magnus.damm@gmail$(echo .)com \
    --cc=nicolas.ferre@atmel$(echo .)com \
    --cc=pavel@ucw$(echo .)cz \
    --cc=rjw@sisk$(echo .)pl \
    --cc=stern@rowland$(echo .)harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox