pm: remove late/early platform driver pm callbacks V2
Subsystems (10)
cover pm: remove late/early platform driver pm callbacks V2
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.
---
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(-)
PATCH 1/7 arm: rework omap suspend_late()/resume_early()
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()
---
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(-)
arch/arm/plat-omap/debug-leds.c +7 -4
@@ -281,24 +281,27 @@ static int /* __init */ fpga_probe(strucreturn 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 )
arch/arm/plat-omap/gpio.c +10 -4
@@ -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(strucreturn 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(strucreturn 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, }, };
PATCH 2/7 dma: rework dw_dmac suspend_late()/resume_early()
In reply to Magnus DammFrom: 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()
---
Untested and not test compiled due to lack of cross compiler.
drivers/dma/dw_dmac.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
drivers/dma/dw_dmac.c +10 -5
@@ -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 platforeturn 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, }, };
PATCH 3/7 dma: rework txx9dmac suspend_late()/resume_early()
In reply to Magnus DammFrom: Magnus Damm <damm-AlSX/UN32fvPDbFq/[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()
---
Untested but compiles fine.
drivers/dma/txx9dmac.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
drivers/dma/txx9dmac.c +10 -5
@@ -1287,17 +1287,18 @@ static void txx9dmac_shutdown(struct platxx9dmac_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_cstatic 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, }, };
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 3/7 dma: rework txx9dmac suspend_late()/resume_early()
In reply to Magnus DammFrom: 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()
---
Untested but compiles fine.
drivers/dma/txx9dmac.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
drivers/dma/txx9dmac.c +10 -5
@@ -1287,17 +1287,18 @@ static void txx9dmac_shutdown(struct platxx9dmac_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_cstatic 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, }, };
PATCH 4/7 i2c: rework i2c-pxa suspend_late()/resume_early()
In reply to Magnus DammFrom: Magnus Damm <damm-AlSX/UN32fvPDbFq/[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()
---
Untested but compiles fine.
drivers/i2c/busses/i2c-pxa.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-)
drivers/i2c/busses/i2c-pxa.c +17 -8
@@ -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, };
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 4/7 i2c: rework i2c-pxa suspend_late()/resume_early()
In reply to Magnus DammFrom: 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()
---
Untested but compiles fine.
drivers/i2c/busses/i2c-pxa.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-)
drivers/i2c/busses/i2c-pxa.c +17 -8
@@ -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, };
PATCH 5/7 i2c: rework i2c-s3c2410 suspend_late()/resume() V2
In reply to Magnus DammFrom: 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()
---
Changes since V1:
- resolved conflicts to fit upstream changes
drivers/i2c/busses/i2c-s3c2410.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-)
drivers/i2c/busses/i2c-s3c2410.c +16 -9
@@ -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_drstatic 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 , }, };
PATCH 5/7 i2c: rework i2c-s3c2410 suspend_late()/resume() V2
In reply to Magnus DammFrom: 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()
---
Changes since V1:
- resolved conflicts to fit upstream changes
drivers/i2c/busses/i2c-s3c2410.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-)
drivers/i2c/busses/i2c-s3c2410.c +16 -9
@@ -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_drstatic 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 , }, };
PATCH 6/7 usb: rework musb suspend()/resume_early()
In reply to Magnus DammFrom: Magnus Damm <damm-AlSX/UN32fvPDbFq/[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()
---
Untested but compiles fine.
drivers/i2c/busses/i2c-pxa.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-)
drivers/usb/musb/musb_core.c +12 -6
@@ -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 platreturn 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, };/*-------------------------------------------------------------------------*/
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 06/07] usb: rework musb suspend()/resume_early()
Quoted 10 lines · Magnus Damm
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_SUSPENDlike this:
suspend()->suspend()
resume_early()->resume_noirq()Signed-off-by Magnus Damm <[email protected]>
Quoted 8 lines
---
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
Re: [PATCH 06/07] usb: rework musb suspend()/resume_early()
In reply to Magnus DammQuoted 10 lines · Magnus Damm
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_SUSPENDlike this:
suspend()->suspend()
resume_early()->resume_noirq()Signed-off-by Magnus Damm <[email protected]>
Quoted 8 lines
---
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
PATCH 6/7 usb: rework musb suspend()/resume_early()
In reply to Magnus DammFrom: 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()
---
Untested but compiles fine.
drivers/i2c/busses/i2c-pxa.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-)
drivers/usb/musb/musb_core.c +12 -6
@@ -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 platreturn 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, };/*-------------------------------------------------------------------------*/
PATCH 7/7 pm: remove platform device suspend_late()/resume_early() V2
In reply to Magnus DammFrom: 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.
---
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(-)
drivers/base/platform.c +0 -36
@@ -628,30 +628,6 @@ static int platform_legacy_suspend(strucreturn 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(strif (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(struif (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(struif (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(structif (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(stif (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(strif (drv->pm) {if (drv->pm->restore_noirq) ret = drv->pm->restore_noirq (dev); - }else { - ret =platform_legacy_resume_early (dev); }return ret;
include/linux/platform_device.h +0 -2
@@ -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;
PATCH 7/7 pm: remove platform device suspend_late()/resume_early() V2
In reply to Magnus DammFrom: 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.
---
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(-)
drivers/base/platform.c +0 -36
@@ -628,30 +628,6 @@ static int platform_legacy_suspend(strucreturn 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(strif (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(struif (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(struif (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(structif (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(stif (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(strif (drv->pm) {if (drv->pm->restore_noirq) ret = drv->pm->restore_noirq (dev); - }else { - ret =platform_legacy_resume_early (dev); }return ret;
include/linux/platform_device.h +0 -2
@@ -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;
Re: [PATCH 07/07] pm: remove platform device suspend_late()/resume_early() V2
Quoted 8 lines · Magnus Damm
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.
Quoted 109 lines
---
Untested but compiles fine.
Changes since V1:
- none, just rediff to fit upstream changesdrivers/base/platform.c | 36 ------------------------------------ include/linux/platform_device.h | 2 -- 2 files changed, 38 deletions(-)drivers/base/platform.c +0
-36@@ -628,30 +628,6 @@ static int platform_legacy_suspend(strucreturn 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(strif (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(struif (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(struif (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(structif (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(stif (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(strif (drv->pm) {if (drv->pm->restore_noirq) ret = drv->pm->restore_noirq (dev); - }else { - ret =platform_legacy_resume_early (dev); }return ret;include/linux/platform_device.h +0
-2@@ -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;
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Re: [PATCH 07/07] pm: remove platform device suspend_late()/resume_early() V2
In reply to Magnus DammQuoted 8 lines · Magnus Damm
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.
Quoted 109 lines
---
Untested but compiles fine.
Changes since V1:
- none, just rediff to fit upstream changesdrivers/base/platform.c | 36 ------------------------------------ include/linux/platform_device.h | 2 -- 2 files changed, 38 deletions(-)drivers/base/platform.c +0
-36@@ -628,30 +628,6 @@ static int platform_legacy_suspend(strucreturn 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(strif (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(struif (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(struif (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(structif (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(stif (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(strif (drv->pm) {if (drv->pm->restore_noirq) ret = drv->pm->restore_noirq (dev); - }else { - ret =platform_legacy_resume_early (dev); }return ret;include/linux/platform_device.h +0
-2@@ -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;
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Quoted 10 lines · Magnus Damm
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_dmacsuspend_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
Quoted 7 lines
These patches simply remove ->suspend_late() and ->resume_early() from struct
platform_driver. Drivers are converted todev_pm_opswithCONFIG_SUSPENDin 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
Quoted 16 lines
---
Changes since V1:
- resolved conflicts in [05/07], rediffed [07/07]
- include lkml, linux-usb and akpmarch/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(-)
Quoted 15 lines · Rafael J. Wysocki
Quoted 14 lines · Magnus Damm
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_dmacsuspend_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() V2These patches simply remove ->suspend_late() and ->resume_early() from struct
platform_driver. Drivers are converted todev_pm_opswithCONFIG_SUSPENDin mind. Untested.
Quoted 8 lines
Quoted 3 lines
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.
Quoted 10 lines
Quoted 10 lines
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(-)
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Quoted 15 lines · Rafael J. Wysocki
Quoted 14 lines · Magnus Damm
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_dmacsuspend_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() V2These patches simply remove ->suspend_late() and ->resume_early() from struct
platform_driver. Drivers are converted todev_pm_opswithCONFIG_SUSPENDin mind. Untested.
Quoted 8 lines
Quoted 3 lines
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.
Quoted 10 lines
Quoted 10 lines
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(-)
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Greg KH
Acked-byQuoted 15 lines · Rafael J. Wysocki
Quoted 14 lines · Magnus Damm
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_dmacsuspend_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() V2These patches simply remove ->suspend_late() and ->resume_early() from struct
platform_driver. Drivers are converted todev_pm_opswithCONFIG_SUSPENDin mind. Untested.
Quoted 6 lines
Quoted 3 lines
All patches except [02/07] are known to compile.
Signed-off-by Magnus Damm <damm-AlSX/UN32fvPDbFq/[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:
to the whole series.
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Greg KH
Acked-byQuoted 15 lines · Rafael J. Wysocki
Quoted 14 lines · Magnus Damm
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_dmacsuspend_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() V2These patches simply remove ->suspend_late() and ->resume_early() from struct
platform_driver. Drivers are converted todev_pm_opswithCONFIG_SUSPENDin mind. Untested.
Quoted 6 lines
Quoted 3 lines
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:
to the whole series.
thanks,
greg k-h
Quoted 10 lines · Magnus Damm
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_dmacsuspend_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
Quoted 7 lines
These patches simply remove ->suspend_late() and ->resume_early() from struct
platform_driver. Drivers are converted todev_pm_opswithCONFIG_SUSPENDin 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
Quoted 16 lines
---
Changes since V1:
- resolved conflicts in [05/07], rediffed [07/07]
- include lkml, linux-usb and akpmarch/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(-)
Quoted 23 lines · Magnus Damm
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_dmacsuspend_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() V2These patches simply remove ->suspend_late() and ->resume_early() from struct
platform_driver. Drivers are converted todev_pm_opswithCONFIG_SUSPENDin 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
Quoted 10 lines
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]>:
Quoted 18 lines · Magnus Damm
Quoted 17 lines
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_dmacsuspend_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() V2These patches simply remove ->suspend_late() and ->resume_early() from struct
platform_driver. Drivers are converted todev_pm_opswithCONFIG_SUSPENDin mind. Untested.All patches except [02/07] are known to compile.
Signed-off-by Magnus Damm <[email protected]>
[..]
Quoted 5 lines
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
at_hdmac: Rework suspend_late()/resume_early()
From: Dan Williams <[email protected]>
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()
--- drivers/dma/at_hdmac.c | 19 ++++++++++++------- 1 files changed, 12 insertions(+), 7 deletions(-)
drivers/dma/at_hdmac.c +12 -7
@@ -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, }, };
Rafael J. Wysocki
AppliedQuoted 26 lines · Dan Williams
2009/7/4 Rafael J. Wysocki <[email protected]>:
Quoted 18 lines · Magnus Damm
Quoted 17 lines
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_dmacsuspend_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() V2These patches simply remove ->suspend_late() and ->resume_early() from struct
platform_driver. Drivers are converted todev_pm_opswithCONFIG_SUSPENDin mind. Untested.All patches except [02/07] are known to compile.
Signed-off-by Magnus Damm <[email protected]>[..]
Quoted 5 lines
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.
Quoted 5 lines
Hi,
My linux-next test builds for
drivers/dma/caught a missed conversion of theat_hdmacdriver. Please check the attached fix (compile tested only) and include it in this series.
Applied to suspend-2.6/linux-next, thanks.
Best,
Rafael
Rafael J. Wysocki
AppliedQuoted 26 lines · Dan Williams
2009/7/4 Rafael J. Wysocki <[email protected]>:
Quoted 18 lines · Magnus Damm
Quoted 17 lines
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_dmacsuspend_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() V2These patches simply remove ->suspend_late() and ->resume_early() from struct
platform_driver. Drivers are converted todev_pm_opswithCONFIG_SUSPENDin mind. Untested.All patches except [02/07] are known to compile.
Signed-off-by Magnus Damm <[email protected]>[..]
Quoted 5 lines
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.
Quoted 5 lines
Hi,
My linux-next test builds for
drivers/dma/caught a missed conversion of theat_hdmacdriver. Please check the attached fix (compile tested only) and include it in this series.
Applied to suspend-2.6/linux-next, thanks.
Best,
Rafael
2009/7/4 Rafael J. Wysocki <[email protected]>:
Quoted 18 lines · Magnus Damm
Quoted 17 lines
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_dmacsuspend_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() V2These patches simply remove ->suspend_late() and ->resume_early() from struct
platform_driver. Drivers are converted todev_pm_opswithCONFIG_SUSPENDin mind. Untested.All patches except [02/07] are known to compile.
Signed-off-by Magnus Damm <[email protected]>
[..]
Quoted 5 lines
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
at_hdmac: Rework suspend_late()/resume_early()
From: Dan Williams <[email protected]>
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()
--- drivers/dma/at_hdmac.c | 19 ++++++++++++------- 1 files changed, 12 insertions(+), 7 deletions(-)
drivers/dma/at_hdmac.c +12 -7
@@ -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, }, };
Quoted 23 lines · Magnus Damm
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_dmacsuspend_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() V2These patches simply remove ->suspend_late() and ->resume_early() from struct
platform_driver. Drivers are converted todev_pm_opswithCONFIG_SUSPENDin 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
Quoted 10 lines
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