linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ore@pengutronix.de (Oleksij Rempel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/2] watchdog: dw_wdt: add stop watchdog operation
Date: Tue, 26 Sep 2017 07:17:32 +0200	[thread overview]
Message-ID: <2203f151-99c8-6c58-8766-70813fafe64d@pengutronix.de> (raw)
In-Reply-To: <20170925161643.GA32601@roeck-us.net>

Hi,

On 25.09.2017 18:16, Guenter Roeck wrote:
> On Mon, Sep 25, 2017 at 07:25:30AM +0200, Oleksij Rempel wrote:
>> From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
>>
>> The only way of stopping the watchdog is by resetting it.
>> Add the watchdog op for stopping the device and reset if
>> a reset line is provided.
>>
>> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
>> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
>> Cc: Wim Van Sebroeck <wim@iguana.be>
>> Cc: Guenter Roeck <linux@roeck-us.net>
>> Cc: linux-watchdog at vger.kernel.org
>> ---
>>
>> changes v3:
>>   - don't return error if rst is not present and set WDOG_HW_RUNNING bit
>>     to notify watchdog core.
>>
>> changes v2:
>>   - test if dw_wdt->rst is NULL instead of IS_ERR
>>
>>   drivers/watchdog/dw_wdt.c | 16 ++++++++++++++++
>>   1 file changed, 16 insertions(+)
>>
>> diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c
>> index 36be987ff9ef..6cc56b18ee52 100644
>> --- a/drivers/watchdog/dw_wdt.c
>> +++ b/drivers/watchdog/dw_wdt.c
>> @@ -135,6 +135,21 @@ static int dw_wdt_start(struct watchdog_device *wdd)
>>   	return 0;
>>   }
>>   
>> +static int dw_wdt_stop(struct watchdog_device *wdd)
>> +{
>> +	struct dw_wdt *dw_wdt = to_dw_wdt(wdd);
>> +
>> +	if (!dw_wdt->rst) {
>> +		set_bit(WDOG_HW_RUNNING, &wdd->status);
> 
> Setting WDOG_HW_RUNNING should be dropped from dw_wdt_start().

you mean, this patch is OK, and i need to provide one more which is 
removing WDOG_HW_RUNNING from dw_wdt_start(). Correct?

Regards,
Oleksij

  reply	other threads:[~2017-09-26  5:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-25  5:25 [PATCH v3 1/2] watchdog: dw_wdt: add stop watchdog operation Oleksij Rempel
2017-09-25  5:25 ` [PATCH v3 2/2] ARM: socfpga: dtsi: add dw-wdt reset lines Oleksij Rempel
2017-09-25 16:16 ` [PATCH v3 1/2] watchdog: dw_wdt: add stop watchdog operation Guenter Roeck
2017-09-26  5:17   ` Oleksij Rempel [this message]
2017-09-26  7:06     ` 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=2203f151-99c8-6c58-8766-70813fafe64d@pengutronix.de \
    --to=ore@pengutronix.de \
    --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).