Lines Matching +full:timeout +full:- +full:minutes
1 // SPDX-License-Identifier: GPL-2.0+
3 * NS pc87413-wdt Watchdog Timer driver for Linux 2.6.x.x
12 * This material is provided "AS-IS" and at no charge.
42 #define DPFX MODNAME " - DEBUG: "
48 #define WDCTL 0x10 /* Watchdog-Timer-Control-Register */
49 #define WDTO 0x11 /* Watchdog timeout register */
55 static int swc_base_addr = -1;
57 static int timeout = DEFAULT_TIMEOUT; /* timeout value */ variable
66 /* -- Low level function ----------------------------------------*/
110 pr_info(DPFX "pc87413 - Enable SWC functions\n"); in pc87413_enable_swc()
148 /* Set watchdog timeout to x minutes */
155 pr_info(DPFX "Set WDTO to %d minutes\n", pc87413_time); in pc87413_programm_wdto()
187 pr_info(DPFX "pc87413 - Disable SW_WD_TREN\n"); in pc87413_disable_sw_wd_tren()
198 pr_info(DPFX "pc87413 - Enable SW_WD_TRG\n"); in pc87413_enable_sw_wd_trg()
213 /* -- Higher level functions ------------------------------------*/
222 pc87413_programm_wdto(timeout); in pc87413_enable()
253 pc87413_programm_wdto(timeout); in pc87413_refresh()
261 /* -- File operations -------------------------------------------*/
275 return -EBUSY; in pc87413_open()
283 pr_info("Watchdog enabled. Timeout set to %d minute(s).\n", timeout); in pc87413_open()
319 * return, if the watchdog is enabled (timeout is set...)
355 return -EFAULT; in pc87413_write()
401 sizeof(ident)) ? -EFAULT : 0; in pc87413_ioctl()
408 int options, retval = -EINVAL; in pc87413_ioctl()
410 return -EFAULT; in pc87413_ioctl()
429 return -EFAULT; in pc87413_ioctl()
433 return -EINVAL; in pc87413_ioctl()
434 timeout = new_timeout; in pc87413_ioctl()
436 fallthrough; /* and return the new timeout */ in pc87413_ioctl()
438 new_timeout = timeout * 60; in pc87413_ioctl()
441 return -ENOTTY; in pc87413_ioctl()
445 /* -- Notifier functions -----------------------------------------*/
456 * trust me - if it happens it does suck.
469 /* -- Module's structures ---------------------------------------*/
491 /* -- Module init functions -------------------------------------*/
509 return -EBUSY; in pc87413_init()
521 pr_info("initialized. timeout=%d min\n", timeout); in pc87413_init()
529 ret = -EBUSY; in pc87413_init()
583 module_param(timeout, int, 0);
584 MODULE_PARM_DESC(timeout,
585 "Watchdog timeout in minutes (default="