From: Guenter Roeck <linux@roeck-us.net>
To: "Janusz Użycki" <j.uzycki@elproma.com.pl>
Cc: Wim Van Sebroeck <wim@iguana.be>,
linux-watchdog@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [3/6] stmp3xxx_rtc_wdt: Add suspend/resume PM support
Date: Tue, 30 Sep 2014 06:46:18 -0700 [thread overview]
Message-ID: <20140930134618.GA1591@roeck-us.net> (raw)
In-Reply-To: <1411419350-1297-3-git-send-email-j.uzycki@elproma.com.pl>
On Mon, Sep 22, 2014 at 10:55:47PM +0200, Janusz Użycki wrote:
> There is no conflict with rtc/rtc-stmp3xxx.c parent
> because modified registers in PM functions of stmp3xxx_rtc_wdt
> are different.
>
> Signed-off-by: Janusz Uzycki <j.uzycki@elproma.com.pl>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/stmp3xxx_rtc_wdt.c | 24 +++++++++++++++++++++++
> 1 file changed, 24 insertions(+)
>
> diff --git a/drivers/watchdog/stmp3xxx_rtc_wdt.c b/drivers/watchdog/stmp3xxx_rtc_wdt.c
> index b4d6b34..77936b6 100644
> --- a/drivers/watchdog/stmp3xxx_rtc_wdt.c
> +++ b/drivers/watchdog/stmp3xxx_rtc_wdt.c
> @@ -95,9 +95,33 @@ static int stmp3xxx_wdt_remove(struct platform_device *pdev)
> return 0;
> }
>
> +static int __maybe_unused stmp3xxx_wdt_suspend(struct device *dev)
> +{
> + struct watchdog_device *wdd = &stmp3xxx_wdd;
> +
> + if (watchdog_active(wdd))
> + return wdt_stop(wdd);
> +
> + return 0;
> +}
> +
> +static int __maybe_unused stmp3xxx_wdt_resume(struct device *dev)
> +{
> + struct watchdog_device *wdd = &stmp3xxx_wdd;
> +
> + if (watchdog_active(wdd))
> + return wdt_start(wdd);
> +
> + return 0;
> +}
> +
> +static SIMPLE_DEV_PM_OPS(stmp3xxx_wdt_pm_ops,
> + stmp3xxx_wdt_suspend, stmp3xxx_wdt_resume);
> +
> static struct platform_driver stmp3xxx_wdt_driver = {
> .driver = {
> .name = "stmp3xxx_rtc_wdt",
> + .pm = &stmp3xxx_wdt_pm_ops,
> },
> .probe = stmp3xxx_wdt_probe,
> .remove = stmp3xxx_wdt_remove,
WARNING: multiple messages have this Message-ID (diff)
From: linux@roeck-us.net (Guenter Roeck)
To: linux-arm-kernel@lists.infradead.org
Subject: [3/6] stmp3xxx_rtc_wdt: Add suspend/resume PM support
Date: Tue, 30 Sep 2014 06:46:18 -0700 [thread overview]
Message-ID: <20140930134618.GA1591@roeck-us.net> (raw)
In-Reply-To: <1411419350-1297-3-git-send-email-j.uzycki@elproma.com.pl>
On Mon, Sep 22, 2014 at 10:55:47PM +0200, Janusz U?ycki wrote:
> There is no conflict with rtc/rtc-stmp3xxx.c parent
> because modified registers in PM functions of stmp3xxx_rtc_wdt
> are different.
>
> Signed-off-by: Janusz Uzycki <j.uzycki@elproma.com.pl>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/stmp3xxx_rtc_wdt.c | 24 +++++++++++++++++++++++
> 1 file changed, 24 insertions(+)
>
> diff --git a/drivers/watchdog/stmp3xxx_rtc_wdt.c b/drivers/watchdog/stmp3xxx_rtc_wdt.c
> index b4d6b34..77936b6 100644
> --- a/drivers/watchdog/stmp3xxx_rtc_wdt.c
> +++ b/drivers/watchdog/stmp3xxx_rtc_wdt.c
> @@ -95,9 +95,33 @@ static int stmp3xxx_wdt_remove(struct platform_device *pdev)
> return 0;
> }
>
> +static int __maybe_unused stmp3xxx_wdt_suspend(struct device *dev)
> +{
> + struct watchdog_device *wdd = &stmp3xxx_wdd;
> +
> + if (watchdog_active(wdd))
> + return wdt_stop(wdd);
> +
> + return 0;
> +}
> +
> +static int __maybe_unused stmp3xxx_wdt_resume(struct device *dev)
> +{
> + struct watchdog_device *wdd = &stmp3xxx_wdd;
> +
> + if (watchdog_active(wdd))
> + return wdt_start(wdd);
> +
> + return 0;
> +}
> +
> +static SIMPLE_DEV_PM_OPS(stmp3xxx_wdt_pm_ops,
> + stmp3xxx_wdt_suspend, stmp3xxx_wdt_resume);
> +
> static struct platform_driver stmp3xxx_wdt_driver = {
> .driver = {
> .name = "stmp3xxx_rtc_wdt",
> + .pm = &stmp3xxx_wdt_pm_ops,
> },
> .probe = stmp3xxx_wdt_probe,
> .remove = stmp3xxx_wdt_remove,
next prev parent reply other threads:[~2014-09-30 13:46 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-22 20:55 [PATCH 1/6] watchdog: watchdog_dev: WATCHDOG_KEEP_ON feature Janusz Uzycki
2014-09-22 20:55 ` Janusz Uzycki
2014-09-22 20:55 ` [PATCH 2/6] watchdog: boottime protection feature (requires 'keep on') Janusz Uzycki
2014-09-22 20:55 ` Janusz Uzycki
2014-09-22 20:55 ` [PATCH 3/6] stmp3xxx_rtc_wdt: Add suspend/resume PM support Janusz Uzycki
2014-09-22 20:55 ` Janusz Uzycki
2014-09-30 13:46 ` Guenter Roeck [this message]
2014-09-30 13:46 ` [3/6] " Guenter Roeck
2014-09-22 20:55 ` [PATCH 4/6] stmp3xxx_rtc_wdt: WATCHDOG_KEEP_ON enabled Janusz Uzycki
2014-09-22 20:55 ` Janusz Uzycki
2014-09-22 20:55 ` [PATCH 5/6] watchdog: suspend/resume PM helper Janusz Uzycki
2014-09-22 20:55 ` Janusz Uzycki
2014-09-22 20:55 ` [PATCH 6/6] stmp3xxx_rtc_wdt: use watchdog's " Janusz Uzycki
2014-09-22 20:55 ` Janusz Uzycki
2014-09-26 4:01 ` [PATCH 1/6] watchdog: watchdog_dev: WATCHDOG_KEEP_ON feature Guenter Roeck
2014-09-26 4:01 ` Guenter Roeck
2014-09-29 16:25 ` Janusz Użycki
2014-09-29 16:25 ` Janusz Użycki
2014-09-30 4:37 ` Guenter Roeck
2014-09-30 4:37 ` Guenter Roeck
2014-09-30 10:22 ` Janusz Użycki
2014-09-30 10:22 ` Janusz Użycki
2014-09-30 13:47 ` Guenter Roeck
2014-09-30 13:47 ` Guenter Roeck
2014-09-30 12:46 ` Janusz Uzycki
2014-09-30 12:46 ` Janusz Uzycki
2014-09-30 12:46 ` Janusz Uzycki
2014-09-30 12:46 ` Janusz Uzycki
2014-09-30 12:58 ` Janusz Użycki
2014-09-30 12:58 ` Janusz Użycki
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=20140930134618.GA1591@roeck-us.net \
--to=linux@roeck-us.net \
--cc=j.uzycki@elproma.com.pl \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=wim@iguana.be \
/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.