All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Kyle Roeschley <kyle.roeschley@ni.com>, Josh Cartwright <joshc@ni.com>
Cc: linux-watchdog@vger.kernel.org
Subject: Re: [RFC 4/4] watchdog: ni9x3x_wdt: Let user control watchdog mode
Date: Sat, 6 Feb 2016 08:42:32 -0800	[thread overview]
Message-ID: <56B62278.1020508@roeck-us.net> (raw)
In-Reply-To: <20160205210328.GB11390@senary>

On 02/05/2016 01:03 PM, Kyle Roeschley wrote:
> On Fri, Feb 05, 2016 at 02:27:20PM -0600, Josh Cartwright wrote:
>> On Thu, Feb 04, 2016 at 07:28:03PM -0600, Kyle Roeschley wrote:
>>> When first powering on, the NI 903x/913x watchdog starts in boot mode.
>>> If not switched from boot mode to user mode within 30 seconds of power
>>> on, the device status LED indicates an unrecoverable error. While before
>>> this was handled automatically, now add a module parameter to disable
>>> this behavior.
>>>
>>> In order to still have a useful watchdog, also add a R/W sysfs attribute
>>> `mode' which can be used to switch the watchdog mode from boot to user
>>> mode (but not user to boot mode).
>>
>> Hmm.  Instead of an attribute, why don't we just ensure the watchdog is
>> in "user" mode in start()?
>>
>>    Josh
>
> Seems like a good idea, except for the fact that we then lose a way to query
> the current watchdog mode. Maybe we could only enable the `mode' attribute
> (and possibly make it read-only) when auto_mode_switch is set to false?

If the system is still running after 30 seconds, it is in user mode.
So your query would have to be pretty quick. If you want to know if the
watchdog is running, which might be more important for the user,
you could check the 'state' attribute instead.

Guenter


  parent reply	other threads:[~2016-02-06 16:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-05  1:28 [RFC 1/4] watchdog: ni9x3x_wdt: Add NI 903x/913x watchdog driver Kyle Roeschley
2016-02-05  1:28 ` [RFC 2/4] watchdog: ni9x3x_wdt: Add counter sysfs attribute Kyle Roeschley
2016-02-05 19:53   ` Josh Cartwright
2016-02-06 16:35     ` Guenter Roeck
2016-02-05  1:28 ` [RFC 3/4] watchdog: ni9x3x_wdt: Add timeout_action " Kyle Roeschley
2016-02-05 20:08   ` Josh Cartwright
2016-02-05 21:13     ` Kyle Roeschley
2016-02-05 21:40       ` Josh Cartwright
2016-02-06  0:00       ` Guenter Roeck
2016-02-05  1:28 ` [RFC 4/4] watchdog: ni9x3x_wdt: Let user control watchdog mode Kyle Roeschley
2016-02-05 20:27   ` Josh Cartwright
2016-02-05 21:03     ` Kyle Roeschley
2016-02-05 21:34       ` Josh Cartwright
2016-02-06 16:42       ` Guenter Roeck [this message]
2016-02-05 19:49 ` [RFC 1/4] watchdog: ni9x3x_wdt: Add NI 903x/913x watchdog driver Josh Cartwright
2016-02-06 16:30 ` Guenter Roeck
2016-02-08 16:06   ` Kyle Roeschley
2016-02-06 16:33 ` 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=56B62278.1020508@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=joshc@ni.com \
    --cc=kyle.roeschley@ni.com \
    --cc=linux-watchdog@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.