linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: "Alice Guo (OSS)" <alice.guo@oss.nxp.com>
Cc: m.felsch@pengutronix.de, wim@linux-watchdog.org,
	shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com,
	kernel@pengutronix.de, linux-imx@nxp.com,
	linux-watchdog@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/7] watchdog: imx7ulp: Move suspend/resume to noirq phase
Date: Sun, 25 Sep 2022 10:37:29 -0700	[thread overview]
Message-ID: <20220925173729.GA1763764@roeck-us.net> (raw)
In-Reply-To: <20220825083256.14565-2-alice.guo@oss.nxp.com>

On Thu, Aug 25, 2022 at 04:32:50PM +0800, Alice Guo (OSS) wrote:
> From: Anson Huang <Anson.Huang@nxp.com>
> 
> The i.MX7ULP's watchdog is enabled by default when out of reset, so the
> resume callback which is to disable watchdog should be called earlier
> to avoid unexpected timeout, move suspend/resume callback to noirq phase.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> Signed-off-by: Alice Guo <alice.guo@nxp.com>
> Reviewed-by: Jacky Bai <ping.bai@nxp.com>
> Tested-by: Peter Chen <peter.chen@nxp.com>
> Tested-by: Li Jun <jun.li@nxp.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
> 
> Changes for v2:
>  - none
> 
>  drivers/watchdog/imx7ulp_wdt.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/watchdog/imx7ulp_wdt.c b/drivers/watchdog/imx7ulp_wdt.c
> index 922b60374295..014f497ea0dc 100644
> --- a/drivers/watchdog/imx7ulp_wdt.c
> +++ b/drivers/watchdog/imx7ulp_wdt.c
> @@ -255,7 +255,7 @@ static int imx7ulp_wdt_probe(struct platform_device *pdev)
>  	return devm_watchdog_register_device(dev, wdog);
>  }
>  
> -static int __maybe_unused imx7ulp_wdt_suspend(struct device *dev)
> +static int __maybe_unused imx7ulp_wdt_suspend_noirq(struct device *dev)
>  {
>  	struct imx7ulp_wdt_device *imx7ulp_wdt = dev_get_drvdata(dev);
>  
> @@ -267,7 +267,7 @@ static int __maybe_unused imx7ulp_wdt_suspend(struct device *dev)
>  	return 0;
>  }
>  
> -static int __maybe_unused imx7ulp_wdt_resume(struct device *dev)
> +static int __maybe_unused imx7ulp_wdt_resume_noirq(struct device *dev)
>  {
>  	struct imx7ulp_wdt_device *imx7ulp_wdt = dev_get_drvdata(dev);
>  	u32 timeout = imx7ulp_wdt->wdd.timeout * WDOG_CLOCK_RATE;
> @@ -286,8 +286,10 @@ static int __maybe_unused imx7ulp_wdt_resume(struct device *dev)
>  	return 0;
>  }
>  
> -static SIMPLE_DEV_PM_OPS(imx7ulp_wdt_pm_ops, imx7ulp_wdt_suspend,
> -			 imx7ulp_wdt_resume);
> +static const struct dev_pm_ops imx7ulp_wdt_pm_ops = {
> +	SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(imx7ulp_wdt_suspend_noirq,
> +				      imx7ulp_wdt_resume_noirq)
> +};
>  
>  static const struct of_device_id imx7ulp_wdt_dt_ids[] = {
>  	{ .compatible = "fsl,imx7ulp-wdt", },
> -- 
> 2.17.1
> 

  reply	other threads:[~2022-09-25 17:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-25  8:32 [PATCH v2 0/7] watchdog: imx7ulp_wdt: update i.MX7ULP WDOG timer driver Alice Guo (OSS)
2022-08-25  8:32 ` [PATCH v2 1/7] watchdog: imx7ulp: Move suspend/resume to noirq phase Alice Guo (OSS)
2022-09-25 17:37   ` Guenter Roeck [this message]
2022-08-25  8:32 ` [PATCH v2 2/7] watchdog: imx7ulp: Add explict memory barrier for unlock sequence Alice Guo (OSS)
2022-09-25 17:37   ` Guenter Roeck
2022-08-25  8:32 ` [PATCH v2 3/7] watchdog: imx7ulp_wdt: Check CMD32EN in wdog init Alice Guo (OSS)
2022-09-25 17:37   ` Guenter Roeck
2022-08-25  8:32 ` [PATCH v2 4/7] watchdog: imx7ulp_wdt: Fix RCS timeout issue Alice Guo (OSS)
2022-09-25 17:38   ` Guenter Roeck
2022-08-25  8:32 ` [PATCH v2 5/7] watchdog: imx7ulp_wdt: Handle wdog reconfigure failure Alice Guo (OSS)
2022-09-25 17:38   ` Guenter Roeck
2022-08-25  8:32 ` [PATCH v2 6/7] watchdog: imx7ulp_wdt: init wdog when it was active Alice Guo (OSS)
2022-09-25 17:38   ` Guenter Roeck
2022-08-25  8:32 ` [PATCH v2 7/7] watchdog: imx93: add watchdog timer on imx93 Alice Guo (OSS)
2022-09-25 17:38   ` Guenter Roeck
2022-09-06  2:11 ` [PATCH v2 0/7] watchdog: imx7ulp_wdt: update i.MX7ULP WDOG timer driver Alice Guo (OSS)

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=20220925173729.GA1763764@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=alice.guo@oss.nxp.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=m.felsch@pengutronix.de \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=wim@linux-watchdog.org \
    /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 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).