linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [v4 0/3] suspend/resume support for OMAP nand driver
@ 2013-06-12 10:25 Pekon Gupta
       [not found] ` <1371032708-9242-3-git-send-email-pekon@ti.com>
       [not found] ` <1371032708-9242-4-git-send-email-pekon@ti.com>
  0 siblings, 2 replies; 3+ messages in thread
From: Pekon Gupta @ 2013-06-12 10:25 UTC (permalink / raw)
  To: linux-mtd, linux-omap, tony; +Cc: Pekon Gupta

This patch series adds low power transition support for OMAP NAND driver.
[Patch 1/3]: Adds pm_runtime calls to handle GPMC module probe and remove
[Patch 2/3]: Adds GPMC suspend/resume support.
[Patch 3/3]: Adds ELM suspend/resume support.

Tested on am335x-evm with NAND flash support, using following:
	echo devices 	> /sys/power/pm_test
	echo mem	> /sys/power/state

	echo core	> /sys/power/pm_test
	echo mem	> /sys/power/state

Changes Since v3:
- CONFIG_PM -> CONFIG_PM_SLEEP
- using struct dev_pm_ops via driver->pm, instead of struct platform_driver
- rebased to 3.10-rc5

Changes Since v2:
- Remove calll back of nand_suspend from omap2 nand driver, as the same call
  already done from suspend activity mtd class driver.

[1] http://comments.gmane.org/gmane.linux.ports.arm.omap/91405


avinash philip (3):
  arm: gpmc: Converts GPMC driver to pm_runtime capable
  arm: gpmc: Low power transition support
  mtd: devices: elm: Low power transition support

 arch/arm/mach-omap2/gpmc.c | 27 +++++++++++++++++++++++++--
 drivers/mtd/devices/elm.c  | 19 +++++++++++++++++++
 2 files changed, 44 insertions(+), 2 deletions(-)

-- 
1.8.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [v4 2/3] arm: gpmc: Low power transition support
       [not found] ` <1371032708-9242-3-git-send-email-pekon@ti.com>
@ 2013-06-13 20:19   ` Kevin Hilman
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Hilman @ 2013-06-13 20:19 UTC (permalink / raw)
  To: Pekon Gupta; +Cc: tony, linux-omap, linux-mtd

Pekon Gupta <pekon@ti.com> writes:

> From: avinash philip <avinashphilip@ti.com>
>
> With GPMC converted to platform driver recently, adds low power
> transition support in driver itself.

The subject/changelog should be clear that this is support for
suspend/resume.

Kevin

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [v4 3/3] mtd: devices: elm: Low power transition support
       [not found] ` <1371032708-9242-4-git-send-email-pekon@ti.com>
@ 2013-06-13 21:03   ` Kevin Hilman
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Hilman @ 2013-06-13 21:03 UTC (permalink / raw)
  To: Pekon Gupta; +Cc: tony, linux-omap, linux-mtd

Pekon Gupta <pekon@ti.com> writes:

> From: avinash philip <avinashphilip@ti.com>
>
> In low power modes of AM335X platforms, peripherals power is cut off.
> This patch supports low power sleep transition support for ELM driver.

This series needs a bit more description about what "low power sleep
transition" is, and how adding runtime PM calls makes this transition
happen.

Kevin

> Signed-off-by: Philip Avinash <avinashphilip@ti.com>
> Signed-off-by: Pekon Gupta <pekon@ti.com>
> ---
>  drivers/mtd/devices/elm.c | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
>
> diff --git a/drivers/mtd/devices/elm.c b/drivers/mtd/devices/elm.c
> index dccef9f..171efcd 100644
> --- a/drivers/mtd/devices/elm.c
> +++ b/drivers/mtd/devices/elm.c
> @@ -20,6 +20,7 @@
>  #include <linux/interrupt.h>
>  #include <linux/io.h>
>  #include <linux/of.h>
> +#include <linux/sched.h>
>  #include <linux/pm_runtime.h>
>  #include <linux/platform_data/elm.h>
>  
> @@ -385,6 +386,23 @@ static int elm_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +static int elm_suspend(struct device *dev)
> +{
> +	pm_runtime_put_sync(dev);
> +	return 0;
> +}
> +
> +static int elm_resume(struct device *dev)
> +{
> +	struct elm_info *info = dev_get_drvdata(dev);
> +
> +	pm_runtime_get_sync(dev);
> +	elm_config(dev, info->bch_type);
> +	return 0;
> +}
> +
> +static SIMPLE_DEV_PM_OPS(elm_pm_ops, elm_suspend, elm_resume);
> +
>  #ifdef CONFIG_OF
>  static const struct of_device_id elm_of_match[] = {
>  	{ .compatible = "ti,am3352-elm" },
> @@ -398,6 +416,7 @@ static struct platform_driver elm_driver = {
>  		.name	= "elm",
>  		.owner	= THIS_MODULE,
>  		.of_match_table = of_match_ptr(elm_of_match),
> +		.pm	= &elm_pm_ops,
>  	},
>  	.probe	= elm_probe,
>  	.remove	= elm_remove,

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-06-13 21:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-12 10:25 [v4 0/3] suspend/resume support for OMAP nand driver Pekon Gupta
     [not found] ` <1371032708-9242-3-git-send-email-pekon@ti.com>
2013-06-13 20:19   ` [v4 2/3] arm: gpmc: Low power transition support Kevin Hilman
     [not found] ` <1371032708-9242-4-git-send-email-pekon@ti.com>
2013-06-13 21:03   ` [v4 3/3] mtd: devices: elm: " Kevin Hilman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).