Lines Matching +full:timer +full:- +full:watchdog
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * IT8712F "Smart Guardian" Watchdog support
5 * Copyright (c) 2006-2007 Jorge Boncompte - DTI2 <jorge@dti2.net>
9 * drivers/char/watchdog/scx200_wdt.c
11 * IT8712F EC-LPC I/O Preliminary Specification 0.8.2
12 * IT8712F EC-LPC I/O Preliminary Specification 0.9.3
16 * software is provided AS-IS with no warranties.
25 #include <linux/watchdog.h>
36 MODULE_AUTHOR("Jorge Boncompte - DTI2 <jorge@dti2.net>");
37 MODULE_DESCRIPTION("IT8712F Watchdog Driver");
43 MODULE_PARM_DESC(margin, "Watchdog margin in seconds");
47 MODULE_PARM_DESC(nowayout, "Disable watchdog shutdown on close");
53 /* Dog Food address - We use the game port address */
67 #define LDN_GPIO 0x07 /* GPIO and Watch Dog Timer */
74 #define WDT_RESET_GAME 0x10 /* Reset timer on read or write to game port */
75 #define WDT_RESET_KBD 0x20 /* Reset timer on keyboard interrupt */
76 #define WDT_RESET_MOUSE 0x40 /* Reset timer on mouse interrupt */
77 #define WDT_RESET_CIR 0x80 /* Reset timer on consumer IR interrupt */
86 MODULE_PARM_DESC(wdt_control_reg, "Value to write to watchdog control "
87 "register. The default WDT_RESET_GAME resets the timer on "
126 return -EBUSY; in superio_enter()
158 pr_info("timer margin %d seconds\n", units); in it8712f_wdt_update_margin()
161 pr_info("timer margin %d minutes\n", units); in it8712f_wdt_update_margin()
184 pr_debug("enabling watchdog timer\n"); in it8712f_wdt_enable()
204 pr_debug("disabling watchdog timer\n"); in it8712f_wdt_disable()
244 return -EFAULT; in it8712f_wdt_write()
259 .identity = "IT8712F Watchdog", in it8712f_wdt_ioctl()
270 return -EFAULT; in it8712f_wdt_ioctl()
290 return -EFAULT; in it8712f_wdt_ioctl()
292 return -EINVAL; in it8712f_wdt_ioctl()
294 return -EINVAL; in it8712f_wdt_ioctl()
308 return -EFAULT; in it8712f_wdt_ioctl()
311 return -ENOTTY; in it8712f_wdt_ioctl()
320 return -EBUSY; in it8712f_wdt_open()
331 pr_warn("watchdog device closed unexpectedly, will not disable the watchdog timer\n"); in it8712f_wdt_release()
334 pr_warn("Watchdog disable failed\n"); in it8712f_wdt_release()
353 .name = "watchdog",
359 int err = -ENODEV; in it8712f_wdt_find()
385 /* Later revisions have 16-bit values per datasheet 0.9.1 */ in it8712f_wdt_find()
392 pr_info("Found IT%04xF chip revision %d - using DogFood address 0x%x\n", in it8712f_wdt_find()
405 return -ENODEV; in it8712f_wdt_init()
407 if (!request_region(address, 1, "IT8712F Watchdog")) { in it8712f_wdt_init()
408 pr_warn("watchdog I/O region busy\n"); in it8712f_wdt_init()
409 return -EBUSY; in it8712f_wdt_init()
414 pr_err("unable to disable watchdog timer\n"); in it8712f_wdt_init()