devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "xt.hu[胡先韬]" <xt.hu@cqplus1.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: "wim@linux-watchdog.org" <wim@linux-watchdog.org>,
	"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-watchdog@vger.kernel.org" <linux-watchdog@vger.kernel.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"Wells Lu 呂芳騰" <wells.lu@sunplus.com>,
	"qinjian[覃健]" <qinjian@cqplus1.com>
Subject: RE: [PATCH v4 2/2] watchdog: Add watchdog driver for Sunplus SP7021
Date: Tue, 4 Jan 2022 02:48:17 +0000	[thread overview]
Message-ID: <eae1abf41ef44f1186c6c781a15516c9@cqplus1.com> (raw)
In-Reply-To: <20220102150027.GA2806117@roeck-us.net>

> -----Original Message-----
> From: Guenter Roeck [mailto:groeck7@gmail.com] On Behalf Of Guenter Roeck
> Sent: Sunday, January 2, 2022 11:00 PM
> To: xt.hu[胡先韬] <xt.hu@cqplus1.com>
> Cc: wim@linux-watchdog.org; p.zabel@pengutronix.de; linux-kernel@vger.kernel.org;
> linux-watchdog@vger.kernel.org; robh+dt@kernel.org; devicetree@vger.kernel.org; Wells Lu 呂芳騰
> <wells.lu@sunplus.com>; qinjian[覃健] <qinjian@cqplus1.com>
> Subject: Re: [PATCH v4 2/2] watchdog: Add watchdog driver for Sunplus SP7021
> 
> On Wed, Dec 29, 2021 at 01:43:08PM +0800, Xiantao Hu wrote:
> > Sunplus SP7021 requires watchdog timer support.
> > Add watchdog driver to enable this.
> >
> > Signed-off-by: Xiantao Hu <xt.hu@cqplus1.com>
> > ---
> > Changes in v4
> >  - Drop the unused varible struct resource *wdt_res.
> >  - Drop the operations related to address 0x9c000274.
> >    Put it in bootloader before entry kernel boot in v3.
> >
> >...
> > +{
> > +	wdev->timeout = timeout;
> > +	sp_wdt_ping(wdev);
> 
> This is exactly what the calling code does if there is no set_timeout
> function, so you can just drop this function,
> 

OK. I will drop it.

> > ...
> > +
> > +	err = clk_prepare_enable(priv->clk);
> > +	if (err) {
> > +		dev_err(dev, "Clock can't be enabled correctly\n");
> > +		return err;
> > +	}
> > +
> > +	/* The timer and watchdog shared the STC reset */
> > +	priv->rstc = devm_reset_control_get_shared(dev, NULL);
> > +	if (!IS_ERR(priv->rstc))
> > +		reset_control_deassert(priv->rstc);
> > +
> > +	err = devm_add_action_or_reset(dev, sp_reset_control_assert,
> > +				       priv->rstc);
> > +	if (err)
> > +		return err;
> > +
> 
> devm_add_action_or_reset() above should only be called if
> devm_reset_control_get_shared succeeds.
> 

OK. I will modify it.

> > +	err = devm_add_action_or_reset(dev, sp_clk_disable_unprepare,
> > +				       priv->clk);
> 
> This should be called immediately after clk_prepare_enable().
> 

OK. I will modify it.

> > +	if (err)
> > +		return err;
> > ...

  parent reply	other threads:[~2022-01-04  2:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-29  5:43 [PATCH v4 0/2] Add watchdog driver for Sunplus SP7021 SoC Xiantao Hu
2021-12-29  5:43 ` [PATCH v4 1/2] watchdog: Add Sunplus SP7021 WDT devicetree bindings documentation Xiantao Hu
2022-01-10 19:11   ` Rob Herring
2021-12-29  5:43 ` [PATCH v4 2/2] watchdog: Add watchdog driver for Sunplus SP7021 Xiantao Hu
2021-12-29  9:39   ` Christophe JAILLET
2022-01-02 15:00   ` Guenter Roeck
2022-01-02 16:14     ` Christophe JAILLET
2022-01-04  2:48     ` xt.hu[胡先韬] [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-12-31  2:50 xt.hu[胡先韬]
2022-01-05 15:53 ` Guenter Roeck

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=eae1abf41ef44f1186c6c781a15516c9@cqplus1.com \
    --to=xt.hu@cqplus1.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=p.zabel@pengutronix.de \
    --cc=qinjian@cqplus1.com \
    --cc=robh+dt@kernel.org \
    --cc=wells.lu@sunplus.com \
    --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).