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

    Ashish Jangam
     
  • 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 watchdog

    I 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

    Hans de Goede
     
  • 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

    Hans de Goede
     
  • 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

    Alan Cox
     
  • 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

    Alan Cox
     

23 May, 2012

3 commits


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

    Viresh Kumar
     
  • 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

    Hans de Goede
     
  • 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

    Wolfram Sang
     

21 Feb, 2012

1 commit


06 Jan, 2012

3 commits


06 Nov, 2011

1 commit


28 Jul, 2011

9 commits


31 Mar, 2011

1 commit


02 Jul, 2010

1 commit


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

    Randy Dunlap
     

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

    James Hogan
     

04 Apr, 2010

1 commit


23 Sep, 2009

1 commit


23 Jun, 2009

1 commit


18 Jun, 2009

1 commit


31 Oct, 2008

1 commit


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

    Randy Dunlap
     

19 Jan, 2008

1 commit


24 Oct, 2007

1 commit


17 Aug, 2007

1 commit


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 latin

    Clean 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

    Alan Cox
     

30 Nov, 2006

1 commit