* [PATCH] mmc: omap_hsmmc: add hibernation support
@ 2015-02-27 11:24 grygorii.strashko
2015-03-05 13:46 ` Ulf Hansson
0 siblings, 1 reply; 2+ messages in thread
From: grygorii.strashko @ 2015-02-27 11:24 UTC (permalink / raw)
To: Chris Ball, Ulf Hansson, Felipe Balbi
Cc: nm, sumit.semwal, NeilBrown, linux-mmc, linux-omap, Russ Dill,
Grygorii Strashko
From: Russ Dill <Russ.Dill@ti.com>
Setting a dev_pm_ops suspend/resume pair but not a set of
hibernation functions means those pm functions will not be
called upon hibernation.
Fix this by using SET_SYSTEM_SLEEP_PM_OPS, which appropriately
assigns the suspend and hibernation handlers and move
omap_hsmmc_x callbacks under CONFIG_PM_SLEEP to avoid build warnings.
Signed-off-by: Russ Dill <Russ.Dill@ti.com>
[Grygorii.Strashko@linaro.org: rebased on top of K4.0]
Signed-off-by: Grygorii Strashko <grygorii.strashko@linaro.org>
---
original patch: https://github.com/russdill/linux/commit/2ea98def0717f0918426c2004122c63d52cff1b4
drivers/mmc/host/omap_hsmmc.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index f84cfb0..9cc1ea3 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -2236,7 +2236,7 @@ static int omap_hsmmc_remove(struct platform_device *pdev)
return 0;
}
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
static int omap_hsmmc_suspend(struct device *dev)
{
struct omap_hsmmc_host *host = dev_get_drvdata(dev);
@@ -2292,10 +2292,6 @@ static int omap_hsmmc_resume(struct device *dev)
pm_runtime_put_autosuspend(host->dev);
return 0;
}
-
-#else
-#define omap_hsmmc_suspend NULL
-#define omap_hsmmc_resume NULL
#endif
static int omap_hsmmc_runtime_suspend(struct device *dev)
@@ -2376,8 +2372,7 @@ static int omap_hsmmc_runtime_resume(struct device *dev)
}
static struct dev_pm_ops omap_hsmmc_dev_pm_ops = {
- .suspend = omap_hsmmc_suspend,
- .resume = omap_hsmmc_resume,
+ SET_SYSTEM_SLEEP_PM_OPS(omap_hsmmc_suspend, omap_hsmmc_resume)
.runtime_suspend = omap_hsmmc_runtime_suspend,
.runtime_resume = omap_hsmmc_runtime_resume,
};
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mmc: omap_hsmmc: add hibernation support
2015-02-27 11:24 [PATCH] mmc: omap_hsmmc: add hibernation support grygorii.strashko
@ 2015-03-05 13:46 ` Ulf Hansson
0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2015-03-05 13:46 UTC (permalink / raw)
To: Grygorii Strashko
Cc: Chris Ball, Felipe Balbi, Nishanth Menon, sumit.semwal,
NeilBrown, linux-mmc, linux-omap, Russ Dill
On 27 February 2015 at 12:24, <grygorii.strashko@linaro.org> wrote:
> From: Russ Dill <Russ.Dill@ti.com>
>
> Setting a dev_pm_ops suspend/resume pair but not a set of
> hibernation functions means those pm functions will not be
> called upon hibernation.
> Fix this by using SET_SYSTEM_SLEEP_PM_OPS, which appropriately
> assigns the suspend and hibernation handlers and move
> omap_hsmmc_x callbacks under CONFIG_PM_SLEEP to avoid build warnings.
>
> Signed-off-by: Russ Dill <Russ.Dill@ti.com>
> [Grygorii.Strashko@linaro.org: rebased on top of K4.0]
> Signed-off-by: Grygorii Strashko <grygorii.strashko@linaro.org>
Applied, thanks!
Kind regards
Uffe
> ---
>
> original patch: https://github.com/russdill/linux/commit/2ea98def0717f0918426c2004122c63d52cff1b4
>
> drivers/mmc/host/omap_hsmmc.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index f84cfb0..9cc1ea3 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -2236,7 +2236,7 @@ static int omap_hsmmc_remove(struct platform_device *pdev)
> return 0;
> }
>
> -#ifdef CONFIG_PM
> +#ifdef CONFIG_PM_SLEEP
> static int omap_hsmmc_suspend(struct device *dev)
> {
> struct omap_hsmmc_host *host = dev_get_drvdata(dev);
> @@ -2292,10 +2292,6 @@ static int omap_hsmmc_resume(struct device *dev)
> pm_runtime_put_autosuspend(host->dev);
> return 0;
> }
> -
> -#else
> -#define omap_hsmmc_suspend NULL
> -#define omap_hsmmc_resume NULL
> #endif
>
> static int omap_hsmmc_runtime_suspend(struct device *dev)
> @@ -2376,8 +2372,7 @@ static int omap_hsmmc_runtime_resume(struct device *dev)
> }
>
> static struct dev_pm_ops omap_hsmmc_dev_pm_ops = {
> - .suspend = omap_hsmmc_suspend,
> - .resume = omap_hsmmc_resume,
> + SET_SYSTEM_SLEEP_PM_OPS(omap_hsmmc_suspend, omap_hsmmc_resume)
> .runtime_suspend = omap_hsmmc_runtime_suspend,
> .runtime_resume = omap_hsmmc_runtime_resume,
> };
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-05 13:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-27 11:24 [PATCH] mmc: omap_hsmmc: add hibernation support grygorii.strashko
2015-03-05 13:46 ` Ulf Hansson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.