mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 14:13:01 -04:00
Merge git://www.linux-watchdog.org/linux-watchdog
Pull watchdog update from Wim Van Sebroeck:
- New driver for Broadcom 7038 Set-Top Box
- imx2_wdt: Use register definition in regmap_write()
- intel-mid: add Magic Closure flag
- watchdog framework improvements:
- Use device tree alias for naming watchdogs
- propagate ping error code to the user space
- Always evaluate new timeout against min_timeout
- Use single variable name for struct watchdog_device
- include clean-ups
* git://www.linux-watchdog.org/linux-watchdog:
watchdog: include: add units for timeout values in kerneldoc
watchdog: include: fix some typos
watchdog: core: propagate ping error code to the user space
watchdog: watchdog_dev: Use single variable name for struct watchdog_device
watchdog: Always evaluate new timeout against min_timeout
watchdog: intel-mid: add Magic Closure flag
watchdog: imx2_wdt: Use register definition in regmap_write()
watchdog: watchdog_dev: Use device tree alias for naming watchdogs
watchdog: Watchdog driver for Broadcom Set-Top Box
watchdog: bcm7038: add device tree binding documentation
This commit is contained in:
commit
42d4ebb42a
9 changed files with 380 additions and 94 deletions
|
|
@ -24,8 +24,8 @@ struct watchdog_device;
|
|||
* @stop: The routine for stopping the watchdog device.
|
||||
* @ping: The routine that sends a keepalive ping to the watchdog device.
|
||||
* @status: The routine that shows the status of the watchdog device.
|
||||
* @set_timeout:The routine for setting the watchdog devices timeout value.
|
||||
* @get_timeleft:The routine that get's the time that's left before a reset.
|
||||
* @set_timeout:The routine for setting the watchdog devices timeout value (in seconds).
|
||||
* @get_timeleft:The routine that gets the time left before a reset (in seconds).
|
||||
* @ref: The ref operation for dyn. allocated watchdog_device structs
|
||||
* @unref: The unref operation for dyn. allocated watchdog_device structs
|
||||
* @ioctl: The routines that handles extra ioctl calls.
|
||||
|
|
@ -33,7 +33,7 @@ struct watchdog_device;
|
|||
* The watchdog_ops structure contains a list of low-level operations
|
||||
* that control a watchdog device. It also contains the module that owns
|
||||
* these operations. The start and stop function are mandatory, all other
|
||||
* functions are optonal.
|
||||
* functions are optional.
|
||||
*/
|
||||
struct watchdog_ops {
|
||||
struct module *owner;
|
||||
|
|
@ -59,9 +59,9 @@ struct watchdog_ops {
|
|||
* @info: Pointer to a watchdog_info structure.
|
||||
* @ops: Pointer to the list of watchdog operations.
|
||||
* @bootstatus: Status of the watchdog device at boot.
|
||||
* @timeout: The watchdog devices timeout value.
|
||||
* @min_timeout:The watchdog devices minimum timeout value.
|
||||
* @max_timeout:The watchdog devices maximum timeout value.
|
||||
* @timeout: The watchdog devices timeout value (in seconds).
|
||||
* @min_timeout:The watchdog devices minimum timeout value (in seconds).
|
||||
* @max_timeout:The watchdog devices maximum timeout value (in seconds).
|
||||
* @driver-data:Pointer to the drivers private data.
|
||||
* @lock: Lock for watchdog core internal use only.
|
||||
* @status: Field that contains the devices internal status bits.
|
||||
|
|
@ -119,8 +119,15 @@ static inline void watchdog_set_nowayout(struct watchdog_device *wdd, bool noway
|
|||
/* Use the following function to check if a timeout value is invalid */
|
||||
static inline bool watchdog_timeout_invalid(struct watchdog_device *wdd, unsigned int t)
|
||||
{
|
||||
return ((wdd->max_timeout != 0) &&
|
||||
(t < wdd->min_timeout || t > wdd->max_timeout));
|
||||
/*
|
||||
* The timeout is invalid if
|
||||
* - the requested value is smaller than the configured minimum timeout,
|
||||
* or
|
||||
* - a maximum timeout is configured, and the requested value is larger
|
||||
* than the maximum timeout.
|
||||
*/
|
||||
return t < wdd->min_timeout ||
|
||||
(wdd->max_timeout && t > wdd->max_timeout);
|
||||
}
|
||||
|
||||
/* Use the following functions to manipulate watchdog driver specific data */
|
||||
|
|
|
|||
Loading…
Reference in a new issue