From: Anson Huang <anson.huang@nxp.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: "wim@linux-watchdog.org" <wim@linux-watchdog.org>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"mark.rutland@arm.com" <mark.rutland@arm.com>,
"shawnguo@kernel.org" <shawnguo@kernel.org>,
"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
"kernel@pengutronix.de" <kernel@pengutronix.de>,
"festevam@gmail.com" <festevam@gmail.com>,
"linux@armlinux.org.uk" <linux@armlinux.org.uk>,
"otavio@ossystems.com.br" <otavio@ossystems.com.br>,
Leonard Crestez <leonard.crestez@nxp.com>,
"u.kleine-koenig@pengutronix.de" <u.kleine-koenig@pengutronix.de>,
"schnitzeltony@gmail.com" <schnitzeltony@gmail.com>,
"jan.tuerk@emtrion.com" <jan.tuerk@emtrion.com>,
"linux-watchdog@vger.kernel.org" <linux-watchdog@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
dl-linux-imx <linux-imx@nxp.com>
Subject: RE: [PATCH V2 2/4] watchdog: Add i.MX7ULP watchdog support
Date: Wed, 21 Aug 2019 02:27:36 +0000 [thread overview]
Message-ID: <DB3PR0402MB391612986F147D70D1486F34F5AA0@DB3PR0402MB3916.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20190820154815.GA20033@roeck-us.net>
Hi, Guenter
> On Tue, Aug 20, 2019 at 08:31:55AM -0700, Guenter Roeck wrote:
> > On Mon, Aug 12, 2019 at 04:53:19PM +0800, Anson.Huang@nxp.com
> wrote:
> > > From: Anson Huang <Anson.Huang@nxp.com>
> > >
> > > The i.MX7ULP Watchdog Timer (WDOG) module is an independent timer
> > > that is available for system use.
> > > It provides a safety feature to ensure that software is executing as
> > > planned and that the CPU is not stuck in an infinite loop or
> > > executing unintended code. If the WDOG module is not serviced
> > > (refreshed) within a certain period, it resets the MCU.
> > >
> > > Add driver support for i.MX7ULP watchdog.
> > >
> > > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> >
> > Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> >
>
> Wait, I have to withdraw that.
>
> With clk_prepare_enable(), you'll also need to call clk_disable_unprepare()
> on remove. An easy way to do this and keep the code simple would be:
>
> static void imx7ulp_wdt_clk_disable_unprepare(void *data) {
> clk_disable_unprepare(data);
> }
>
> static int imx7ulp_wdt_probe(...)
> {
> ...
> ret = clk_prepare_enable(imx7ulp_wdt->clk);
> if (ret)
> return ret;
> ret = devm_add_action_or_reset(dev,
> imx7ulp_wdt_clk_disable_unprepare);
> if (ret)
> return ret;
> ...
>
Ah, yes, I added the error handle but missed the remove case, thanks for your kindly
suggestion, please help review V3.
Thanks,
Anson.
next prev parent reply other threads:[~2019-08-21 2:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-12 8:53 [PATCH V2 1/4] dt-bindings: watchdog: Add i.MX7ULP bindings Anson.Huang
2019-08-12 8:53 ` [PATCH V2 2/4] watchdog: Add i.MX7ULP watchdog support Anson.Huang
2019-08-20 15:31 ` Guenter Roeck
2019-08-20 15:48 ` Guenter Roeck
2019-08-21 2:27 ` Anson Huang [this message]
2019-08-12 8:53 ` [PATCH V2 3/4] ARM: imx_v6_v7_defconfig: Enable CONFIG_IMX7ULP_WDT by default Anson.Huang
2019-08-12 8:53 ` [PATCH V2 4/4] ARM: dts: imx7ulp: Add wdog1 node Anson.Huang
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=DB3PR0402MB391612986F147D70D1486F34F5AA0@DB3PR0402MB3916.eurprd04.prod.outlook.com \
--to=anson.huang@nxp.com \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=jan.tuerk@emtrion.com \
--cc=kernel@pengutronix.de \
--cc=leonard.crestez@nxp.com \
--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=linux@armlinux.org.uk \
--cc=linux@roeck-us.net \
--cc=mark.rutland@arm.com \
--cc=otavio@ossystems.com.br \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=schnitzeltony@gmail.com \
--cc=shawnguo@kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
--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).