summaryrefslogtreecommitdiff
path: root/drivers/watchdog/hpwdt.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-07-01 19:33:16 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-07-01 19:33:16 -0700
commit93899e39e86bfc021a190a9c26e8e516561f2756 (patch)
treec01fe48641d2a81acfa083748ef267a9607e84af /drivers/watchdog/hpwdt.c
parent5f1201d515819e7cfaaac3f0a30ff7b556261386 (diff)
parentb2102eb36e7909c779e46f66595fda75aa219f4c (diff)
Merge git://www.linux-watchdog.org/linux-watchdog
Pull watchdog updates from Wim Van Sebroeck: "This contains: - new driver for ST's LPC Watchdog - new driver for Conexant Digicolor CX92755 SoC - new driver for DA9062 watchdog - Addition of the watchdog registration deferral mechanism - several improvements on omap_wdt - several improvements and reboot-support for imgpdc_wdt - max63xx_wdt improvements - imx2_wdt improvements - dw_wdt improvements - and other small improvements and fixes" * git://www.linux-watchdog.org/linux-watchdog: (37 commits) watchdog: omap_wdt: early_enable module parameter watchdog: gpio_wdt: Add option for early registration watchdog: watchdog_core: Add watchdog registration deferral mechanism watchdog: max63xx: dynamically allocate device watchdog: imx2_wdt: Disable previously acquired clock on error path watchdog: imx2_wdt: Check for clk_prepare_enable() error watchdog: hpwdt: Add support for WDIOC_SETOPTIONS watchdog: docs: omap_wdt also understands nowayout watchdog: omap_wdt: implement get_timeleft watchdog: da9062: DA9062 watchdog driver watchdog: imx2_wdt: set watchdog parent device watchdog: mena21_wdt: Fix possible NULL pointer dereference watchdog: dw_wdt: keepalive the watchdog at write time watchdog: dw_wdt: No need for a spinlock watchdog: imx2_wdt: also set wdog->timeout to new_timeout watchdog: Allow compile test of GPIO consumers if !GPIOLIB watchdog: cadence: Add dependency on HAS_IOMEM watchdog: max63xx_wdt: Constify platform_device_id watchdog: MAX63XX_WATCHDOG does not depend on ARM watchdog: imgpdc: Add some documentation about the timeout ...
Diffstat (limited to 'drivers/watchdog/hpwdt.c')
-rw-r--r--drivers/watchdog/hpwdt.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index ada3e44f9932..286369d4f0f5 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -588,7 +588,7 @@ static long hpwdt_ioctl(struct file *file, unsigned int cmd,
{
void __user *argp = (void __user *)arg;
int __user *p = argp;
- int new_margin;
+ int new_margin, options;
int ret = -ENOTTY;
switch (cmd) {
@@ -608,6 +608,20 @@ static long hpwdt_ioctl(struct file *file, unsigned int cmd,
ret = 0;
break;
+ case WDIOC_SETOPTIONS:
+ ret = get_user(options, p);
+ if (ret)
+ break;
+
+ if (options & WDIOS_DISABLECARD)
+ hpwdt_stop();
+
+ if (options & WDIOS_ENABLECARD) {
+ hpwdt_start();
+ hpwdt_ping();
+ }
+ break;
+
case WDIOC_SETTIMEOUT:
ret = get_user(new_margin, p);
if (ret)