* Re: [PATCH 00/07] pm: remove late/early platform driver pm callbacks V2
[not found] ` <200907050145.15122.rjw@sisk.pl>
@ 2009-09-09 1:25 ` Dan Williams
2009-09-09 22:09 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Dan Williams @ 2009-09-09 1:25 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Magnus Damm, linux-kernel, gregkh, pavel, hskinnemoen, anemo,
linux-usb, akpm, stern, ben-linux, linux-omap, linux-pm,
felipe.balbi, nicolas.ferre, linux-next
[-- 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,
},
};
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 00/07] pm: remove late/early platform driver pm callbacks V2
2009-09-09 1:25 ` [PATCH 00/07] pm: remove late/early platform driver pm callbacks V2 Dan Williams
@ 2009-09-09 22:09 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2009-09-09 22:09 UTC (permalink / raw)
To: Dan Williams
Cc: Magnus Damm, linux-kernel, gregkh, pavel, hskinnemoen, anemo,
linux-usb, akpm, stern, ben-linux, linux-omap, linux-pm,
felipe.balbi, nicolas.ferre, linux-next
On Wednesday 09 September 2009, Dan Williams wrote:
> 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.
Applied to suspend-2.6/linux-next, thanks.
Best,
Rafael
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-09-09 22:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20090624092306.14276.127.sendpatchset@rx1.opensource.se>
[not found] ` <200907050145.15122.rjw@sisk.pl>
2009-09-09 1:25 ` [PATCH 00/07] pm: remove late/early platform driver pm callbacks V2 Dan Williams
2009-09-09 22:09 ` Rafael J. Wysocki
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).