Lines Matching +full:watchdog +full:- +full:timer

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>
37 MODULE_AUTHOR("Jorge Boncompte - DTI2 <jorge@dti2.net>");
38 MODULE_DESCRIPTION("IT8712F Watchdog Driver");
44 MODULE_PARM_DESC(margin, "Watchdog margin in seconds");
48 MODULE_PARM_DESC(nowayout, "Disable watchdog shutdown on close");
54 /* Dog Food address - We use the game port address */
68 #define LDN_GPIO 0x07 /* GPIO and Watch Dog Timer */
75 #define WDT_RESET_GAME 0x10 /* Reset timer on read or write to game port */
76 #define WDT_RESET_KBD 0x20 /* Reset timer on keyboard interrupt */
77 #define WDT_RESET_MOUSE 0x40 /* Reset timer on mouse interrupt */
78 #define WDT_RESET_CIR 0x80 /* Reset timer on consumer IR interrupt */
87 MODULE_PARM_DESC(wdt_control_reg, "Value to write to watchdog control "
88 "register. The default WDT_RESET_GAME resets the timer on "
127 return -EBUSY; in superio_enter()
159 pr_info("timer margin %d seconds\n", units); in it8712f_wdt_update_margin()
162 pr_info("timer margin %d minutes\n", units); in it8712f_wdt_update_margin()
185 pr_debug("enabling watchdog timer\n"); in it8712f_wdt_enable()
205 pr_debug("disabling watchdog timer\n"); in it8712f_wdt_disable()
245 return -EFAULT; in it8712f_wdt_write()
260 .identity = "IT8712F Watchdog", in it8712f_wdt_ioctl()
271 return -EFAULT; in it8712f_wdt_ioctl()
291 return -EFAULT; in it8712f_wdt_ioctl()
293 return -EINVAL; in it8712f_wdt_ioctl()
295 return -EINVAL; in it8712f_wdt_ioctl()
309 return -EFAULT; in it8712f_wdt_ioctl()
312 return -ENOTTY; in it8712f_wdt_ioctl()
321 return -EBUSY; in it8712f_wdt_open()
332 pr_warn("watchdog device closed unexpectedly, will not disable the watchdog timer\n"); in it8712f_wdt_release()
335 pr_warn("Watchdog disable failed\n"); in it8712f_wdt_release()
355 .name = "watchdog",
361 int err = -ENODEV; in it8712f_wdt_find()
387 /* Later revisions have 16-bit values per datasheet 0.9.1 */ in it8712f_wdt_find()
394 pr_info("Found IT%04xF chip revision %d - using DogFood address 0x%x\n", in it8712f_wdt_find()
407 return -ENODEV; in it8712f_wdt_init()
409 if (!request_region(address, 1, "IT8712F Watchdog")) { in it8712f_wdt_init()
410 pr_warn("watchdog I/O region busy\n"); in it8712f_wdt_init()
411 return -EBUSY; in it8712f_wdt_init()
416 pr_err("unable to disable watchdog timer\n"); in it8712f_wdt_init()