linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: peter.griffin@linaro.org (Peter Griffin)
To: linux-arm-kernel@lists.infradead.org
Subject: [STLinux Kernel] [PATCH 4/4] watchdog: st_wdt: Add new driver for ST's LPC Watchdog
Date: Fri, 5 Sep 2014 19:25:31 +0100	[thread overview]
Message-ID: <20140905182531.GA2383@griffinp-ThinkPad-X1-Carbon-2nd> (raw)
In-Reply-To: <20140905155811.GA12374@roeck-us.net>

Hi,

> > +static int st_wdog_remove(struct platform_device *pdev)
> > +{
> > +	struct st_wdog *st_wdog = watchdog_get_drvdata(&st_wdog_dev);
> > +
> > +	if (watchdog_active(&st_wdog_dev))
> > +		st_wdog_stop(&st_wdog_dev);
> > +
> > +	st_wdog_setup(st_wdog, WDT_DISABLE);
> > +
> > +	watchdog_unregister_device(&st_wdog_dev);
> > +
> No clk_disable_unprepare ?
> 
> Maye it is not necessary, but then I wonder why you have it above.

I think your right it should have a clk_disable_unprepare. Otherwise you will end up leaking a clock
reference each time you insmod / rmmod the driver.
> 
> > +	return 0;
> > +}
> > +
> > +#ifdef CONFIG_PM
> > +static int st_wdog_suspend(struct device *dev)
> > +{
> > +	if (watchdog_active(&st_wdog_dev))
> > +		st_wdog_stop(&st_wdog_dev);
> > +
> 
> Is any clock activity necessary here ? Just asking, I don't really have an idea.

I would also expect the clock to be managed in suspend / resume callbacks.

regards,

Peter.

  reply	other threads:[~2014-09-05 18:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-04 14:39 [PATCH 0/4] watchdog: Introduce new driver to support ST's Watchdog Lee Jones
2014-09-04 14:39 ` [PATCH 1/4] ARM: STi: DT: STiH407: Add Device Tree node for LPC Watchdog Lee Jones
2014-09-04 14:39 ` [PATCH 2/4] ARM: multi_v7_defconfig: Enable support for ST's " Lee Jones
2014-09-04 14:39 ` [PATCH 3/4] watchdog: st_wdt: Provide binding documentation for ST's LPC Watchdog driver Lee Jones
2014-09-04 14:39 ` Lee Jones
2014-09-05 15:27   ` Guenter Roeck
2014-09-08 11:57     ` Lee Jones
2014-09-04 14:39 ` [PATCH 4/4] watchdog: st_wdt: Add new driver for ST's LPC Watchdog Lee Jones
2014-09-05 15:58   ` Guenter Roeck
2014-09-05 18:25     ` Peter Griffin [this message]
2014-09-08 12:32     ` Lee Jones
2014-09-08 13:31       ` Guenter Roeck
2014-09-08 14:35         ` Lee Jones
2014-09-22  7:36       ` David Paris
2014-09-22 10:24       ` David Paris

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=20140905182531.GA2383@griffinp-ThinkPad-X1-Carbon-2nd \
    --to=peter.griffin@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.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).