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 <[email protected]>
---
Changes since V1:
- resolved conflicts in [05/07], rediffed [07/07]
- include lkml, linux-usb and akpm
arch/arm/plat-omap/debug-leds.c | 11 +++++++----
arch/arm/plat-omap/gpio.c | 14 ++++++++++----
drivers/base/platform.c | 36 ------------------------------------
drivers/dma/dw_dmac.c | 15 ++++++++++-----
drivers/dma/txx9dmac.c | 15 ++++++++++-----
drivers/i2c/busses/i2c-pxa.c | 25 +++++++++++++++++--------
drivers/i2c/busses/i2c-s3c2410.c | 25 ++++++++++++++++---------
drivers/usb/musb/musb_core.c | 18 ++++++++++++------
include/linux/platform_device.h | 2 --
9 files changed, 82 insertions(+), 79 deletions(-)
From: Magnus Damm <[email protected]>
This patch reworks platform driver power management code
for i2c-pxa 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()
Signed-off-by: Magnus Damm <[email protected]>
---
Untested but compiles fine.
drivers/i2c/busses/i2c-pxa.c | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
--- 0001/drivers/i2c/busses/i2c-pxa.c
+++ work/drivers/i2c/busses/i2c-pxa.c 2009-06-01 15:26:06.000000000 +0900
@@ -1135,35 +1135,44 @@ static int __exit i2c_pxa_remove(struct
}
#ifdef CONFIG_PM
-static int i2c_pxa_suspend_late(struct platform_device *dev, pm_message_t state)
+static int i2c_pxa_suspend_noirq(struct device *dev)
{
- struct pxa_i2c *i2c = platform_get_drvdata(dev);
+ struct platform_device *pdev = to_platform_device(dev);
+ struct pxa_i2c *i2c = platform_get_drvdata(pdev);
+
clk_disable(i2c->clk);
+
return 0;
}
-static int i2c_pxa_resume_early(struct platform_device *dev)
+static int i2c_pxa_resume_noirq(struct device *dev)
{
- struct pxa_i2c *i2c = platform_get_drvdata(dev);
+ struct platform_device *pdev = to_platform_device(dev);
+ struct pxa_i2c *i2c = platform_get_drvdata(pdev);
clk_enable(i2c->clk);
i2c_pxa_reset(i2c);
return 0;
}
+
+static struct dev_pm_ops i2c_pxa_dev_pm_ops = {
+ .suspend_noirq = i2c_pxa_suspend_noirq,
+ .resume_noirq = i2c_pxa_resume_noirq,
+};
+
+#define I2C_PXA_DEV_PM_OPS (&i2c_pxa_dev_pm_ops)
#else
-#define i2c_pxa_suspend_late NULL
-#define i2c_pxa_resume_early NULL
+#define I2C_PXA_DEV_PM_OPS NULL
#endif
static struct platform_driver i2c_pxa_driver = {
.probe = i2c_pxa_probe,
.remove = __exit_p(i2c_pxa_remove),
- .suspend_late = i2c_pxa_suspend_late,
- .resume_early = i2c_pxa_resume_early,
.driver = {
.name = "pxa2xx-i2c",
.owner = THIS_MODULE,
+ .pm = I2C_PXA_DEV_PM_OPS,
},
.id_table = i2c_pxa_id_table,
};
From: Magnus Damm <[email protected]>
This patch reworks platform driver power management code
for musb from legacy callbacks to dev_pm_ops.
The callbacks are converted for CONFIG_SUSPEND like this:
suspend() -> suspend()
resume_early() -> resume_noirq()
Signed-off-by: Magnus Damm <[email protected]>
---
Untested but compiles fine.
drivers/i2c/busses/i2c-pxa.c | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
--- 0001/drivers/usb/musb/musb_core.c
+++ work/drivers/usb/musb/musb_core.c 2009-06-01 15:27:12.000000000 +0900
@@ -2168,8 +2168,9 @@ static int __devexit musb_remove(struct
#ifdef CONFIG_PM
-static int musb_suspend(struct platform_device *pdev, pm_message_t message)
+static int musb_suspend(struct device *dev)
{
+ struct platform_device *pdev = to_platform_device(dev);
unsigned long flags;
struct musb *musb = dev_to_musb(&pdev->dev);
@@ -2196,8 +2197,9 @@ static int musb_suspend(struct platform_
return 0;
}
-static int musb_resume_early(struct platform_device *pdev)
+static int musb_resume_noirq(struct device *dev)
{
+ struct platform_device *pdev = to_platform_device(dev);
struct musb *musb = dev_to_musb(&pdev->dev);
if (!musb->clock)
@@ -2215,9 +2217,14 @@ static int musb_resume_early(struct plat
return 0;
}
+static struct dev_pm_ops musb_dev_pm_ops = {
+ .suspend = musb_suspend,
+ .resume_noirq = musb_resume_noirq,
+};
+
+#define MUSB_DEV_PM_OPS (&musb_dev_pm_ops)
#else
-#define musb_suspend NULL
-#define musb_resume_early NULL
+#define MUSB_DEV_PM_OPS NULL
#endif
static struct platform_driver musb_driver = {
@@ -2225,11 +2232,10 @@ static struct platform_driver musb_drive
.name = (char *)musb_driver_name,
.bus = &platform_bus_type,
.owner = THIS_MODULE,
+ .pm = MUSB_DEV_PM_OPS,
},
.remove = __devexit_p(musb_remove),
.shutdown = musb_shutdown,
- .suspend = musb_suspend,
- .resume_early = musb_resume_early,
};
/*-------------------------------------------------------------------------*/
From: Magnus Damm <[email protected]>
This patch reworks platform driver power management code
for txx9dmac 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()
Signed-off-by: Magnus Damm <[email protected]>
---
Untested but compiles fine.
drivers/dma/txx9dmac.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
--- 0001/drivers/dma/txx9dmac.c
+++ work/drivers/dma/txx9dmac.c 2009-06-01 16:34:23.000000000 +0900
@@ -1287,17 +1287,18 @@ static void txx9dmac_shutdown(struct pla
txx9dmac_off(ddev);
}
-static int txx9dmac_suspend_late(struct platform_device *pdev,
- pm_message_t mesg)
+static int txx9dmac_suspend_noirq(struct device *dev)
{
+ struct platform_device *pdev = to_platform_device(dev);
struct txx9dmac_dev *ddev = platform_get_drvdata(pdev);
txx9dmac_off(ddev);
return 0;
}
-static int txx9dmac_resume_early(struct platform_device *pdev)
+static int txx9dmac_resume_noirq(struct device *dev)
{
+ struct platform_device *pdev = to_platform_device(dev);
struct txx9dmac_dev *ddev = platform_get_drvdata(pdev);
struct txx9dmac_platform_data *pdata = pdev->dev.platform_data;
u32 mcr;
@@ -1310,6 +1311,11 @@ static int txx9dmac_resume_early(struct
}
+static struct dev_pm_ops txx9dmac_dev_pm_ops = {
+ .suspend_noirq = txx9dmac_suspend_noirq,
+ .resume_noirq = txx9dmac_resume_noirq,
+};
+
static struct platform_driver txx9dmac_chan_driver = {
.remove = __exit_p(txx9dmac_chan_remove),
.driver = {
@@ -1320,10 +1326,9 @@ static struct platform_driver txx9dmac_c
static struct platform_driver txx9dmac_driver = {
.remove = __exit_p(txx9dmac_remove),
.shutdown = txx9dmac_shutdown,
- .suspend_late = txx9dmac_suspend_late,
- .resume_early = txx9dmac_resume_early,
.driver = {
.name = "txx9dmac",
+ .pm = &txx9dmac_dev_pm_ops,
},
};
From: Magnus Damm <[email protected]>
This patch reworks platform driver power management code
for omap drivers using late/early legacy callbacks.
The callbacks are converted for CONFIG_SUSPEND like this:
suspend_late() -> suspend_noirq()
resume_early() -> resume_noirq()
Signed-off-by: Magnus Damm <[email protected]>
---
Untested but compiles just fine.
arch/arm/plat-omap/debug-leds.c | 11 +++++++----
arch/arm/plat-omap/gpio.c | 14 ++++++++++----
2 files changed, 17 insertions(+), 8 deletions(-)
--- 0001/arch/arm/plat-omap/debug-leds.c
+++ work/arch/arm/plat-omap/debug-leds.c 2009-06-01 15:50:21.000000000 +0900
@@ -281,24 +281,27 @@ static int /* __init */ fpga_probe(struc
return 0;
}
-static int fpga_suspend_late(struct platform_device *pdev, pm_message_t mesg)
+static int fpga_suspend_noirq(struct device *dev)
{
__raw_writew(~0, &fpga->leds);
return 0;
}
-static int fpga_resume_early(struct platform_device *pdev)
+static int fpga_resume_noirq(struct device *dev)
{
__raw_writew(~hw_led_state, &fpga->leds);
return 0;
}
+static struct dev_pm_ops fpga_dev_pm_ops = {
+ .suspend_noirq = fpga_suspend_noirq,
+ .resume_noirq = fpga_resume_noirq,
+};
static struct platform_driver led_driver = {
.driver.name = "omap_dbg_led",
+ .driver.pm = &fpga_dev_pm_ops,
.probe = fpga_probe,
- .suspend_late = fpga_suspend_late,
- .resume_early = fpga_resume_early,
};
static int __init fpga_init(void)
--- 0001/arch/arm/plat-omap/gpio.c
+++ work/arch/arm/plat-omap/gpio.c 2009-06-01 16:30:56.000000000 +0900
@@ -1264,8 +1264,9 @@ static struct irq_chip mpuio_irq_chip =
#include <linux/platform_device.h>
-static int omap_mpuio_suspend_late(struct platform_device *pdev, pm_message_t mesg)
+static int omap_mpuio_suspend_noirq(struct device *dev)
{
+ struct platform_device *pdev = to_platform_device(dev);
struct gpio_bank *bank = platform_get_drvdata(pdev);
void __iomem *mask_reg = bank->base + OMAP_MPUIO_GPIO_MASKIT;
unsigned long flags;
@@ -1278,8 +1279,9 @@ static int omap_mpuio_suspend_late(struc
return 0;
}
-static int omap_mpuio_resume_early(struct platform_device *pdev)
+static int omap_mpuio_resume_noirq(struct device *dev)
{
+ struct platform_device *pdev = to_platform_device(dev);
struct gpio_bank *bank = platform_get_drvdata(pdev);
void __iomem *mask_reg = bank->base + OMAP_MPUIO_GPIO_MASKIT;
unsigned long flags;
@@ -1291,14 +1293,18 @@ static int omap_mpuio_resume_early(struc
return 0;
}
+static struct dev_pm_ops omap_mpuio_dev_pm_ops = {
+ .suspend_noirq = omap_mpuio_suspend_noirq,
+ .resume_noirq = omap_mpuio_resume_noirq,
+};
+
/* use platform_driver for this, now that there's no longer any
* point to sys_device (other than not disturbing old code).
*/
static struct platform_driver omap_mpuio_driver = {
- .suspend_late = omap_mpuio_suspend_late,
- .resume_early = omap_mpuio_resume_early,
.driver = {
.name = "mpuio",
+ .pm = &omap_mpuio_dev_pm_ops,
},
};
From: Magnus Damm <[email protected]>
This patch reworks platform driver power management code
for dw_dmac 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()
Signed-off-by: Magnus Damm <[email protected]>
---
Untested and not test compiled due to lack of cross compiler.
drivers/dma/dw_dmac.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
--- 0001/drivers/dma/dw_dmac.c
+++ work/drivers/dma/dw_dmac.c 2009-06-01 16:31:34.000000000 +0900
@@ -1399,8 +1399,9 @@ static void dw_shutdown(struct platform_
clk_disable(dw->clk);
}
-static int dw_suspend_late(struct platform_device *pdev, pm_message_t mesg)
+static int dw_suspend_noirq(struct device *dev)
{
+ struct platform_device *pdev = to_platform_device(dev);
struct dw_dma *dw = platform_get_drvdata(pdev);
dw_dma_off(platform_get_drvdata(pdev));
@@ -1408,23 +1409,27 @@ static int dw_suspend_late(struct platfo
return 0;
}
-static int dw_resume_early(struct platform_device *pdev)
+static int dw_resume_noirq(struct device *dev)
{
+ struct platform_device *pdev = to_platform_device(dev);
struct dw_dma *dw = platform_get_drvdata(pdev);
clk_enable(dw->clk);
dma_writel(dw, CFG, DW_CFG_DMA_EN);
return 0;
-
}
+static struct dev_pm_ops dw_dev_pm_ops = {
+ .suspend_noirq = dw_suspend_noirq,
+ .resume_noirq = dw_resume_noirq,
+};
+
static struct platform_driver dw_driver = {
.remove = __exit_p(dw_remove),
.shutdown = dw_shutdown,
- .suspend_late = dw_suspend_late,
- .resume_early = dw_resume_early,
.driver = {
.name = "dw_dmac",
+ .pm = &dw_dev_pm_ops,
},
};
From: Magnus Damm <[email protected]>
This is V2 of the i2c-s3c2410 dev_pm_ops patch.
The callbacks are converted for CONFIG_SUSPEND like this:
suspend_late() -> suspend_noirq()
resume() -> resume()
Signed-off-by: Magnus Damm <[email protected]>
---
Changes since V1:
- resolved conflicts to fit upstream changes
drivers/i2c/busses/i2c-s3c2410.c | 25 ++++++++++++++++---------
1 file changed, 16 insertions(+), 9 deletions(-)
--- 0001/drivers/i2c/busses/i2c-s3c2410.c
+++ work/drivers/i2c/busses/i2c-s3c2410.c 2009-06-22 17:18:22.000000000 +0900
@@ -951,17 +951,20 @@ static int s3c24xx_i2c_remove(struct pla
}
#ifdef CONFIG_PM
-static int s3c24xx_i2c_suspend_late(struct platform_device *dev,
- pm_message_t msg)
+static int s3c24xx_i2c_suspend_noirq(struct device *dev)
{
- struct s3c24xx_i2c *i2c = platform_get_drvdata(dev);
+ struct platform_device *pdev = to_platform_device(dev);
+ struct s3c24xx_i2c *i2c = platform_get_drvdata(pdev);
+
i2c->suspended = 1;
+
return 0;
}
-static int s3c24xx_i2c_resume(struct platform_device *dev)
+static int s3c24xx_i2c_resume(struct device *dev)
{
- struct s3c24xx_i2c *i2c = platform_get_drvdata(dev);
+ struct platform_device *pdev = to_platform_device(dev);
+ struct s3c24xx_i2c *i2c = platform_get_drvdata(pdev);
i2c->suspended = 0;
s3c24xx_i2c_init(i2c);
@@ -969,9 +972,14 @@ static int s3c24xx_i2c_resume(struct pla
return 0;
}
+static struct dev_pm_ops s3c24xx_i2c_dev_pm_ops = {
+ .suspend_noirq = s3c24xx_i2c_suspend_noirq,
+ .resume = s3c24xx_i2c_resume,
+};
+
+#define S3C24XX_DEV_PM_OPS (&s3c24xx_i2c_dev_pm_ops)
#else
-#define s3c24xx_i2c_suspend_late NULL
-#define s3c24xx_i2c_resume NULL
+#define S3C24XX_DEV_PM_OPS NULL
#endif
/* device driver for platform bus bits */
@@ -990,12 +998,11 @@ MODULE_DEVICE_TABLE(platform, s3c24xx_dr
static struct platform_driver s3c24xx_i2c_driver = {
.probe = s3c24xx_i2c_probe,
.remove = s3c24xx_i2c_remove,
- .suspend_late = s3c24xx_i2c_suspend_late,
- .resume = s3c24xx_i2c_resume,
.id_table = s3c24xx_driver_ids,
.driver = {
.owner = THIS_MODULE,
.name = "s3c-i2c",
+ .pm = S3C24XX_DEV_PM_OPS,
},
};
From: Magnus Damm <[email protected]>
This is V2 of the platform driver power management late/early
callback removal patch. The callbacks ->suspend_late() and
->resume_early() are removed since all in-tree users now have
been migrated to dev_pm_ops.
Signed-off-by: Magnus Damm <[email protected]>
---
Untested but compiles fine.
Changes since V1:
- none, just rediff to fit upstream changes
drivers/base/platform.c | 36 ------------------------------------
include/linux/platform_device.h | 2 --
2 files changed, 38 deletions(-)
--- 0001/drivers/base/platform.c
+++ work/drivers/base/platform.c 2009-06-24 17:27:33.000000000 +0900
@@ -628,30 +628,6 @@ static int platform_legacy_suspend(struc
return ret;
}
-static int platform_legacy_suspend_late(struct device *dev, pm_message_t mesg)
-{
- struct platform_driver *pdrv = to_platform_driver(dev->driver);
- struct platform_device *pdev = to_platform_device(dev);
- int ret = 0;
-
- if (dev->driver && pdrv->suspend_late)
- ret = pdrv->suspend_late(pdev, mesg);
-
- return ret;
-}
-
-static int platform_legacy_resume_early(struct device *dev)
-{
- struct platform_driver *pdrv = to_platform_driver(dev->driver);
- struct platform_device *pdev = to_platform_device(dev);
- int ret = 0;
-
- if (dev->driver && pdrv->resume_early)
- ret = pdrv->resume_early(pdev);
-
- return ret;
-}
-
static int platform_legacy_resume(struct device *dev)
{
struct platform_driver *pdrv = to_platform_driver(dev->driver);
@@ -714,8 +690,6 @@ static int platform_pm_suspend_noirq(str
if (drv->pm) {
if (drv->pm->suspend_noirq)
ret = drv->pm->suspend_noirq(dev);
- } else {
- ret = platform_legacy_suspend_late(dev, PMSG_SUSPEND);
}
return ret;
@@ -750,8 +724,6 @@ static int platform_pm_resume_noirq(stru
if (drv->pm) {
if (drv->pm->resume_noirq)
ret = drv->pm->resume_noirq(dev);
- } else {
- ret = platform_legacy_resume_early(dev);
}
return ret;
@@ -797,8 +769,6 @@ static int platform_pm_freeze_noirq(stru
if (drv->pm) {
if (drv->pm->freeze_noirq)
ret = drv->pm->freeze_noirq(dev);
- } else {
- ret = platform_legacy_suspend_late(dev, PMSG_FREEZE);
}
return ret;
@@ -833,8 +803,6 @@ static int platform_pm_thaw_noirq(struct
if (drv->pm) {
if (drv->pm->thaw_noirq)
ret = drv->pm->thaw_noirq(dev);
- } else {
- ret = platform_legacy_resume_early(dev);
}
return ret;
@@ -869,8 +837,6 @@ static int platform_pm_poweroff_noirq(st
if (drv->pm) {
if (drv->pm->poweroff_noirq)
ret = drv->pm->poweroff_noirq(dev);
- } else {
- ret = platform_legacy_suspend_late(dev, PMSG_HIBERNATE);
}
return ret;
@@ -905,8 +871,6 @@ static int platform_pm_restore_noirq(str
if (drv->pm) {
if (drv->pm->restore_noirq)
ret = drv->pm->restore_noirq(dev);
- } else {
- ret = platform_legacy_resume_early(dev);
}
return ret;
--- 0001/include/linux/platform_device.h
+++ work/include/linux/platform_device.h 2009-06-24 17:27:33.000000000 +0900
@@ -57,8 +57,6 @@ struct platform_driver {
int (*remove)(struct platform_device *);
void (*shutdown)(struct platform_device *);
int (*suspend)(struct platform_device *, pm_message_t state);
- int (*suspend_late)(struct platform_device *, pm_message_t state);
- int (*resume_early)(struct platform_device *);
int (*resume)(struct platform_device *);
struct device_driver driver;
struct platform_device_id *id_table;
On Wed 2009-06-24 18:24:09, Magnus Damm wrote:
> From: Magnus Damm <[email protected]>
>
> This is V2 of the platform driver power management late/early
> callback removal patch. The callbacks ->suspend_late() and
> ->resume_early() are removed since all in-tree users now have
> been migrated to dev_pm_ops.
>
> Signed-off-by: Magnus Damm <[email protected]>
Looks ok to me. ACK.
> ---
>
> Untested but compiles fine.
>
> Changes since V1:
> - none, just rediff to fit upstream changes
>
> drivers/base/platform.c | 36 ------------------------------------
> include/linux/platform_device.h | 2 --
> 2 files changed, 38 deletions(-)
>
> --- 0001/drivers/base/platform.c
> +++ work/drivers/base/platform.c 2009-06-24 17:27:33.000000000 +0900
> @@ -628,30 +628,6 @@ static int platform_legacy_suspend(struc
> return ret;
> }
>
> -static int platform_legacy_suspend_late(struct device *dev, pm_message_t mesg)
> -{
> - struct platform_driver *pdrv = to_platform_driver(dev->driver);
> - struct platform_device *pdev = to_platform_device(dev);
> - int ret = 0;
> -
> - if (dev->driver && pdrv->suspend_late)
> - ret = pdrv->suspend_late(pdev, mesg);
> -
> - return ret;
> -}
> -
> -static int platform_legacy_resume_early(struct device *dev)
> -{
> - struct platform_driver *pdrv = to_platform_driver(dev->driver);
> - struct platform_device *pdev = to_platform_device(dev);
> - int ret = 0;
> -
> - if (dev->driver && pdrv->resume_early)
> - ret = pdrv->resume_early(pdev);
> -
> - return ret;
> -}
> -
> static int platform_legacy_resume(struct device *dev)
> {
> struct platform_driver *pdrv = to_platform_driver(dev->driver);
> @@ -714,8 +690,6 @@ static int platform_pm_suspend_noirq(str
> if (drv->pm) {
> if (drv->pm->suspend_noirq)
> ret = drv->pm->suspend_noirq(dev);
> - } else {
> - ret = platform_legacy_suspend_late(dev, PMSG_SUSPEND);
> }
>
> return ret;
> @@ -750,8 +724,6 @@ static int platform_pm_resume_noirq(stru
> if (drv->pm) {
> if (drv->pm->resume_noirq)
> ret = drv->pm->resume_noirq(dev);
> - } else {
> - ret = platform_legacy_resume_early(dev);
> }
>
> return ret;
> @@ -797,8 +769,6 @@ static int platform_pm_freeze_noirq(stru
> if (drv->pm) {
> if (drv->pm->freeze_noirq)
> ret = drv->pm->freeze_noirq(dev);
> - } else {
> - ret = platform_legacy_suspend_late(dev, PMSG_FREEZE);
> }
>
> return ret;
> @@ -833,8 +803,6 @@ static int platform_pm_thaw_noirq(struct
> if (drv->pm) {
> if (drv->pm->thaw_noirq)
> ret = drv->pm->thaw_noirq(dev);
> - } else {
> - ret = platform_legacy_resume_early(dev);
> }
>
> return ret;
> @@ -869,8 +837,6 @@ static int platform_pm_poweroff_noirq(st
> if (drv->pm) {
> if (drv->pm->poweroff_noirq)
> ret = drv->pm->poweroff_noirq(dev);
> - } else {
> - ret = platform_legacy_suspend_late(dev, PMSG_HIBERNATE);
> }
>
> return ret;
> @@ -905,8 +871,6 @@ static int platform_pm_restore_noirq(str
> if (drv->pm) {
> if (drv->pm->restore_noirq)
> ret = drv->pm->restore_noirq(dev);
> - } else {
> - ret = platform_legacy_resume_early(dev);
> }
>
> return ret;
> --- 0001/include/linux/platform_device.h
> +++ work/include/linux/platform_device.h 2009-06-24 17:27:33.000000000 +0900
> @@ -57,8 +57,6 @@ struct platform_driver {
> int (*remove)(struct platform_device *);
> void (*shutdown)(struct platform_device *);
> int (*suspend)(struct platform_device *, pm_message_t state);
> - int (*suspend_late)(struct platform_device *, pm_message_t state);
> - int (*resume_early)(struct platform_device *);
> int (*resume)(struct platform_device *);
> struct device_driver driver;
> struct platform_device_id *id_table;
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
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 <[email protected]>
If no one objects, I'd like to take this series into the suspend-2.6 tree as
2.6.32 material. Greg?
Pavel, is your ACK for the entire series?
Best,
Rafael
> ---
>
> Changes since V1:
> - resolved conflicts in [05/07], rediffed [07/07]
> - include lkml, linux-usb and akpm
>
> arch/arm/plat-omap/debug-leds.c | 11 +++++++----
> arch/arm/plat-omap/gpio.c | 14 ++++++++++----
> drivers/base/platform.c | 36 ------------------------------------
> drivers/dma/dw_dmac.c | 15 ++++++++++-----
> drivers/dma/txx9dmac.c | 15 ++++++++++-----
> drivers/i2c/busses/i2c-pxa.c | 25 +++++++++++++++++--------
> drivers/i2c/busses/i2c-s3c2410.c | 25 ++++++++++++++++---------
> drivers/usb/musb/musb_core.c | 18 ++++++++++++------
> include/linux/platform_device.h | 2 --
> 9 files changed, 82 insertions(+), 79 deletions(-)
On Wed 2009-06-24 20:48:39, Rafael J. Wysocki wrote:
> 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 <[email protected]>
>
> If no one objects, I'd like to take this series into the suspend-2.6 tree as
> 2.6.32 material. Greg?
>
> Pavel, is your ACK for the entire series?
Well, I don't really understand stuff like dw_dmac.c, but it looks
basically okay to me. I guess ACK might be okay.
> > arch/arm/plat-omap/debug-leds.c | 11 +++++++----
> > arch/arm/plat-omap/gpio.c | 14 ++++++++++----
> > drivers/base/platform.c | 36 ------------------------------------
> > drivers/dma/dw_dmac.c | 15 ++++++++++-----
> > drivers/dma/txx9dmac.c | 15 ++++++++++-----
> > drivers/i2c/busses/i2c-pxa.c | 25 +++++++++++++++++--------
> > drivers/i2c/busses/i2c-s3c2410.c | 25 ++++++++++++++++---------
> > drivers/usb/musb/musb_core.c | 18 ++++++++++++------
> > include/linux/platform_device.h | 2 --
> > 9 files changed, 82 insertions(+), 79 deletions(-)
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
On Wed, Jun 24, 2009 at 08:48:39PM +0200, Rafael J. Wysocki wrote:
> 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 <[email protected]>
>
> If no one objects, I'd like to take this series into the suspend-2.6 tree as
> 2.6.32 material. Greg?
Looks good to me, feel free to add an:
Acked-by: Greg Kroah-Hartman <[email protected]>
to the whole series.
thanks,
greg k-h
On Wed, Jun 24, 2009 at 06:24:00PM +0900, Magnus Damm wrote:
> From: Magnus Damm <[email protected]>
>
> This patch reworks platform driver power management code
> for musb from legacy callbacks to dev_pm_ops.
>
> The callbacks are converted for CONFIG_SUSPEND like this:
> suspend() -> suspend()
> resume_early() -> resume_noirq()
>
> Signed-off-by: Magnus Damm <[email protected]>
> ---
>
> Untested but compiles fine.
>
> drivers/i2c/busses/i2c-pxa.c | 25 +++++++++++++++++--------
> 1 file changed, 17 insertions(+), 8 deletions(-)
>
> --- 0001/drivers/usb/musb/musb_core.c
I think you need to look at the tools you used to create this series,
the diffstat doesn't seem to match up here :)
thanks,
greg k-h
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 <[email protected]>
> ---
>
> Changes since V1:
> - resolved conflicts in [05/07], rediffed [07/07]
> - include lkml, linux-usb and akpm
>
> arch/arm/plat-omap/debug-leds.c | 11 +++++++----
> arch/arm/plat-omap/gpio.c | 14 ++++++++++----
> drivers/base/platform.c | 36 ------------------------------------
> drivers/dma/dw_dmac.c | 15 ++++++++++-----
> drivers/dma/txx9dmac.c | 15 ++++++++++-----
> drivers/i2c/busses/i2c-pxa.c | 25 +++++++++++++++++--------
> drivers/i2c/busses/i2c-s3c2410.c | 25 ++++++++++++++++---------
> drivers/usb/musb/musb_core.c | 18 ++++++++++++------
> include/linux/platform_device.h | 2 --
> 9 files changed, 82 insertions(+), 79 deletions(-)
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.
Best,
Rafael
2009/7/4 Rafael J. Wysocki <[email protected]>:
> 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 <[email protected]>
[..]
>
> 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
On Wednesday 09 September 2009, Dan Williams wrote:
> 2009/7/4 Rafael J. Wysocki <[email protected]>:
> > 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 <[email protected]>
> [..]
> >
> > 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