From: Kevin Hilman <khilman@linaro.org>
To: Pekon Gupta <pekon@ti.com>
Cc: tony@atomide.com, linux-omap@vger.kernel.org,
linux-mtd@lists.infradead.org
Subject: Re: [v4 3/3] mtd: devices: elm: Low power transition support
Date: Thu, 13 Jun 2013 14:03:38 -0700 [thread overview]
Message-ID: <8761xhbu51.fsf@linaro.org> (raw)
In-Reply-To: <1371032708-9242-4-git-send-email-pekon@ti.com> (Pekon Gupta's message of "Wed, 12 Jun 2013 15:55:08 +0530")
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,
WARNING: multiple messages have this Message-ID (diff)
From: Kevin Hilman <khilman@linaro.org>
To: Pekon Gupta <pekon@ti.com>
Cc: linux-mtd@lists.infradead.org, linux-omap@vger.kernel.org,
tony@atomide.com, avinash philip <avinashphilip@ti.com>
Subject: Re: [v4 3/3] mtd: devices: elm: Low power transition support
Date: Thu, 13 Jun 2013 14:03:38 -0700 [thread overview]
Message-ID: <8761xhbu51.fsf@linaro.org> (raw)
In-Reply-To: <1371032708-9242-4-git-send-email-pekon@ti.com> (Pekon Gupta's message of "Wed, 12 Jun 2013 15:55:08 +0530")
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,
next prev parent reply other threads:[~2013-06-13 21:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-12 10:25 [v4 0/3] suspend/resume support for OMAP nand driver Pekon Gupta
2013-06-12 10:25 ` Pekon Gupta
2013-06-12 10:25 ` [v4 1/3] arm: gpmc: Converts GPMC driver to pm_runtime capable Pekon Gupta
2013-06-12 10:25 ` [v4 2/3] arm: gpmc: Low power transition support Pekon Gupta
2013-06-13 20:19 ` Kevin Hilman
2013-06-13 20:19 ` Kevin Hilman
2013-06-12 10:25 ` [v4 3/3] mtd: devices: elm: " Pekon Gupta
2013-06-13 21:03 ` Kevin Hilman [this message]
2013-06-13 21:03 ` Kevin Hilman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8761xhbu51.fsf@linaro.org \
--to=khilman@linaro.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=pekon@ti.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.