30 May, 2012
5 commits
-
This driver adds support for the watchdog functionality provided by
the Dialog Semiconductor DA9052 PMIC chip.Tested on samsung smdkv6410 and i.mx53 QS boards.
Signed-off-by: Anthony Olech
Signed-off-by: Ashish Jangam
Signed-off-by: Wim Van Sebroeck -
If a driver's watchdog_device struct is part of a dynamically allocated
struct (which it often will be), merely locking the module is not enough,
even with a drivers module locked, the driver can be unbound from the device,
examples:
1) The root user can unbind it through sysfd
2) The i2c bus master driver being unloaded for an i2c watchdogI will gladly admit that these are corner cases, but we still need to handle
them correctly.The fix for this consists of 2 parts:
1) Add ref / unref operations, so that the driver can refcount the struct
holding the watchdog_device struct and delay freeing it until any
open filehandles referring to it are closed
2) Most driver operations will do IO on the device and the driver should not
do any IO on the device after it has been unbound. Rather then letting each
driver deal with this internally, it is better to ensure at the watchdog
core level that no operations (other then unref) will get called after
the driver has called watchdog_unregister_device(). This actually is the
bulk of this patch.Signed-off-by: Hans de Goede
Signed-off-by: Wim Van Sebroeck -
This patch fixes some potential multithreading issues, despite only
allowing one process to open the /dev/watchdog device, we can still get
called multiple times at the same time, since a program could be using thread,
or could share the fd after a fork.This causes 2 potential problems:
1) watchdog_start / open do an unlocked test_n_set / test_n_clear,
if these 2 race, the watchdog could be stopped while the active
bit indicates it is running or visa versa.2) Most watchdog_dev drivers probably assume that only one
watchdog-op will get called at a time, this is not necessary
true atm.Signed-off-by: Hans de Goede
Signed-off-by: Wim Van Sebroeck -
Create the watchdog class and it's associated devices.
Signed-off-by: Alan Cox
Signed-off-by: Hans de Goede
Signed-off-by: Wim Van Sebroeck -
We keep the old /dev/watchdog interface file for the first watchdog via
miscdev. This is basically a cut and paste of the relevant interface code
from the rtc driver layer tweaked for watchdog.Revised to fix problems noted by Hans de Goede
Signed-off-by: Alan Cox
Signed-off-by: Hans de Goede
Signed-off-by: Tomas Winkler
Signed-off-by: Wim Van Sebroeck
23 May, 2012
3 commits
-
we start a infinite loop when user gives ./watchdog-test, and when user
ctrl + c's the program, we just exit immeadiately with out closing the
filedescriptor of the watchdog device. a signal handler is used to
do the job of closing the filedescriptor and exiting the program.Signed-off-by: Devendra Naga
Signed-off-by: Wim Van Sebroeck -
in the watchdog test code, the ioctl is performed on the watchdog device
and just doing exit(0) so we leak a filedescripor.Signed-off-by: Devendra Naga
Signed-off-by: Wim Van Sebroeck -
Signed-off-by: Devendra Naga
Signed-off-by: Wim Van Sebroeck
28 Mar, 2012
3 commits
-
This patch adds support for WDIOC_GETTIMELEFT IOCTL in watchdog core. So, there
is another function pointer added to struct watchdog_ops, which can be passed by
drivers to support this IOCTL.Related documentation is updated too.
Signed-off-by: Viresh Kumar
Signed-off-by: Linus Walleij
Signed-off-by: Wim Van Sebroeck -
When a set_timeout operation succeeds this does not necessarily mean that
the exact timeout requested has been achieved, because the watchdog does not
necessarily have a 1 second resolution. So rather then have the core set
the timeout member of the watchdog_device struct to the exact requested
value, instead the driver should set it to the actually achieved timeout value.Signed-off-by: Hans de Goede
Signed-off-by: Wim Van Sebroeck -
The 00-index file in the watchdog directory is, like many others,
outdated (conversion-howto is missing) and doesn't contain worthwhile
additional information. As it seems to be a maintenance burden without
much gain, simply remove it.Signed-off-by: Wolfram Sang
Signed-off-by: Wim Van Sebroeck
21 Feb, 2012
1 commit
-
Correct spelling "retruns" to "returns" in
Documentations/watchdog/watchdog-kernel-api.txtSigned-off-by: Masanari Iida
Signed-off-by: Jiri Kosina
06 Jan, 2012
3 commits
-
nowayout is also handled by the watchdog core. Describe how this needs
to be addressed in the conversion guide.Signed-off-by: Wolfram Sang
Signed-off-by: Wim Van Sebroeck -
Add the convert_drivers_to_kernel_api.txt to the 00-INDEX file.
Signed-off-by: Wim Van Sebroeck
-
Add two nowayout helpers for the Watchdog Timer Driver Kernel API.
And apply this to the already converted drivers.
Note: s3c2410_wdt lost the nowayout feature during the conversion.Reviewed-by: Wolfram Sang
Acked-by: Mark Brown
Signed-off-by: Wim Van Sebroeck
06 Nov, 2011
1 commit
-
Signed-off-by: Wolfram Sang
Cc: Randy Dunlap
Signed-off-by: Wim Van Sebroeck
28 Jul, 2011
9 commits
-
Add min_timeout (minimum timeout) and max_timeout
values so that the framework can check if the new
timeout value is between the minimum and maximum
timeout values. If both values are 0, then the
framework will leave the check for the watchdog
device driver itself.Signed-off-by: Alan Cox
Signed-off-by: Wim Van Sebroeck
Acked-by: Arnd Bergmann
Acked-by: Wolfram Sang -
Add support for extra ioctl calls by adding a
ioctl watchdog operation. This operation will be
called before we do our own handling of ioctl
commands. This way we can override the internal
ioctl command handling and we can also add
extra ioctl commands. The ioctl watchdog operation
should return the appropriate error codes or
-ENOIOCTLCMD if the ioctl command should be handled
through the internal ioctl handling of the framework.Signed-off-by: Alan Cox
Signed-off-by: Wim Van Sebroeck
Acked-by: Arnd Bergmann
Acked-by: Wolfram Sang -
Add support for the nowayout feature to the
WatchDog Timer Driver Core framework.
This feature prevents the watchdog timer from being
stopped.Signed-off-by: Alan Cox
Signed-off-by: Wim Van Sebroeck
Acked-by: Arnd Bergmann
Acked-by: Wolfram Sang -
Add support for the Magic Close feature to the
WatchDog Timer Driver Core framework.Signed-off-by: Alan Cox
Signed-off-by: Wim Van Sebroeck
Acked-by: Arnd Bergmann
Acked-by: Wolfram Sang -
This part add's the WDIOC_SETTIMEOUT and WDIOC_GETTIMEOUT ioctl
functionality to the WatchDog Timer Driver Core framework.Signed-off-by: Alan Cox
Signed-off-by: Wim Van Sebroeck
Acked-by: Arnd Bergmann
Acked-by: Wolfram Sang -
This part add's the WDIOC_SETOPTIONS ioctl functionality
to the WatchDog Timer Driver Core framework.Signed-off-by: Alan Cox
Signed-off-by: Wim Van Sebroeck
Acked-by: Arnd Bergmann
Acked-by: Wolfram Sang -
This part add's the WDIOC_KEEPALIVE ioctl functionality to the
WatchDog Timer Driver Core framework. Please note that the
WDIOF_KEEPALIVEPING bit has to be set in the watchdog_info
options field.Signed-off-by: Alan Cox
Signed-off-by: Wim Van Sebroeck
Acked-by: Arnd Bergmann
Acked-by: Wolfram Sang -
This part add's the basic ioctl functionality to the
WatchDog Timer Driver Core framework. The supported
ioctl call's are:
WDIOC_GETSUPPORT
WDIOC_GETSTATUS
WDIOC_GETBOOTSTATUSSigned-off-by: Alan Cox
Signed-off-by: Wim Van Sebroeck
Acked-by: Arnd Bergmann
Acked-by: Wolfram Sang -
The WatchDog Timer Driver Core is a framework
that contains the common code for all watchdog-driver's.
It also introduces a watchdog device structure and the
operations that go with it.This is the introduction of this framework. This part
supports the minimal watchdog userspace API (or with
other words: the functionality to use /dev/watchdog's
open, release and write functionality as defined in
the simplest watchdog API). Extra functionality will
follow in the next set of patches.Signed-off-by: Alan Cox
Signed-off-by: Wim Van Sebroeck
Acked-by: Arnd Bergmann
Acked-by: Wolfram Sang
31 Mar, 2011
1 commit
-
Fixes generated by 'codespell' and manually reviewed.
Signed-off-by: Lucas De Marchi
02 Jul, 2010
1 commit
-
Add an entry for imx2_wdt in watchdog-parameters.txt
Signed-off-by: Fabio Estevam
Acked-by: Wolfram Sang
Signed-off-by: Wim Van Sebroeck
25 May, 2010
1 commit
-
Move the limited watchdog driver help from kernel-parameters.txt
to Documentation/watchdog/watchdog-parameters.txt and add info to it
for all watchdog drivers except the ones that have driver-specific
files already.Correct minor comments and MODULE_PARM_DESC() text in 2 places.
Signed-off-by: Randy Dunlap
Signed-off-by: Wim Van Sebroeck
06 Apr, 2010
1 commit
-
In the watchdog-test program and watchdog-api.txt, pass the values to
the WDIOC_SETOPTIONS ioctl as a pointer to an integer containing the
values intead of directly in the third ioctl argument. The actual
watchdog drivers in drivers/watchdog don't read the options directly
from the argument but use get_user and copy_from_user.Signed-off-by: James Hogan
Signed-off-by: Wim Van Sebroeck
Signed-off-by: Andrew Morton
04 Apr, 2010
1 commit
-
Don't terminate the watchdog daemon when fsync() fails because no
watchdog driver actually implements the fsync() syscall.Signed-off-by: Giel van Schijndel
Signed-off-by: Wim Van Sebroeck
23 Sep, 2009
1 commit
-
Fix up -Wmissing-prototypes in compileable userspace code, mainly under
Documentation/.Signed-off-by: Ladinu Chandrasinghe
Signed-off-by: Trevor Keith
Cc: Sam Ravnborg
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
23 Jun, 2009
1 commit
-
Add a priority option so that the user can choose if we do the NMI
first or last.Signed-off-by: Thomas Mingarelli
Signed-off-by: Wim Van Sebroeck
18 Jun, 2009
1 commit
-
Add NMI sourcing functionality (Can only be active if nmi_watchdog is
inactive).Signed-off-by: Thomas Mingarelli
Signed-off-by: Wim Van Sebroeck
31 Oct, 2008
1 commit
-
Signed-off-by: Alexey Dobriyan
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
13 Aug, 2008
1 commit
-
Currently source files in the Documentation/ sub-dir can easily bit-rot
since they are not generally buildable, either because they are hidden in
text files or because there are no Makefile rules for them. This needs to
be fixed so that the source files remain usable and good examples of code
instead of bad examples.Add the ability to build source files that are in the Documentation/ dir.
Add to Kconfig as "BUILD_DOCSRC" config symbol.Use "CONFIG_BUILD_DOCSRC=1 make ..." to build objects from the
Documentation/ sources. Or enable BUILD_DOCSRC in the *config system.
However, this symbol depends on HEADERS_CHECK since the header files need
to be installed (for userspace builds).Built (using cross-tools) for x86-64, i386, alpha, ia64, sparc32,
sparc64, powerpc, sh, m68k, & mips.Signed-off-by: Randy Dunlap
Reviewed-by: Sam Ravnborg
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
19 Jan, 2008
1 commit
-
It was not clear what the difference is/was between the
nowayout feature and the Magic Close feature.Signed-off-by: "Andrew Dyer"
Signed-off-by: Wim Van Sebroeck
24 Oct, 2007
1 commit
-
Make some improvements for Documentation/watchdog/src/watchdog-simple.c.
Signed-off-by: WANG Cong
Signed-off-by: Wim Van Sebroeck
Signed-off-by: Andrew Morton
17 Aug, 2007
1 commit
-
Add a 00-INDEX file to Documentation/watchdog/
Signed-off-by: Jesper Juhl
Signed-off-by: Wim Van Sebroeck
25 May, 2007
1 commit
-
Random sampling of some URLs in the Documentation tree to see how many were
stale found that one watchdog driver was now a porn site. In fact if the
watchdogs document directory was any older it would be written in latinClean it up somewhat and add Last reviewed headers, something all the
Documentation could do with IMHO.Signed-off-by: Alan Cox
Signed-off-by: Andrew Morton
Signed-off-by: Wim Van Sebroeck
30 Nov, 2006
1 commit
-
This patch fixes typos in various Documentation txts. The patch addresses some
+words starting with the letter 'T'.Signed-off-by: Matt LaPlante
Acked-by: Randy Dunlap
Signed-off-by: Adrian Bunk