Lines Matching +full:power +full:- +full:off +full:- +full:time +full:- +full:sec
1 // SPDX-License-Identifier: GPL-2.0-only
10 * 960108 Fixed end-of-file pointer (Thanks to Dan Hollis), added
24 * added watchdog disable/re-enable routines. Added firmware
60 #include <linux/errno.h> /* For the -ENODEV/... values */
71 #include <linux/ioport.h> /* For io-port access */
79 #define WATCHDOG_DRIVER_NAME "ISA-PC Watchdog"
94 * These are the auto-probe addresses available.
104 * PCI-PC Watchdog card.
117 on-board processor */
125 (1:SW1 <-> 0:SW2) */
128 /* max. time we give an ISA watchdog card to process a command */
150 20, /* OFF-OFF-OFF = 20 Sec */
151 40, /* OFF-OFF-ON = 40 Sec */
152 60, /* OFF-ON-OFF = 1 Min */
153 300, /* OFF-ON-ON = 5 Min */
154 600, /* ON-OFF-OFF = 10 Min */
155 1800, /* ON-OFF-ON = 30 Min */
156 3600, /* ON-ON-OFF = 1 Hour */
157 7200, /* ON-ON-ON = 2 hour */
176 /* this is private data for each ISA-PC watchdog card */
200 /* default heartbeat = delay-time from dip-switches */
205 "(2 <= heartbeat <= 7200 or 0=delay-time from dip-switches, default="
337 pr_info("ISA-PC Watchdog (REV.A) detected at port 0x%04x\n", in pcwd_show_card_info()
341 pr_info("ISA-PC Watchdog (REV.C) detected at port 0x%04x (Firmware version: %s)\n", in pcwd_show_card_info()
344 pr_info("Option switches (0x%02x): Temperature Reset Enable=%s, Power On Delay=%s\n", in pcwd_show_card_info()
346 ((option_switches & 0x10) ? "ON" : "OFF"), in pcwd_show_card_info()
347 ((option_switches & 0x08) ? "ON" : "OFF")); in pcwd_show_card_info()
368 pr_info("No previous trip detected - Cold boot or reset\n"); in pcwd_show_card_info()
389 /* Re-trigger watchdog by writing to port 0 */ in pcwd_timer_ping()
393 /* Re-set the timer interval */ in pcwd_timer_ping()
420 return -EIO; in pcwd_start()
448 return -EIO; in pcwd_stop()
472 return -EINVAL; in pcwd_set_heartbeat()
497 * over-temperature condition. And the reboot in pcwd_get_status()
561 return -1; in pcwd_get_temperature()
565 return -ENODEV; in pcwd_get_temperature()
606 return -EFAULT; in pcwd_ioctl()
618 return -EFAULT; in pcwd_ioctl()
625 return -EFAULT; in pcwd_ioctl()
640 return -EINVAL; in pcwd_ioctl()
648 return -EFAULT; in pcwd_ioctl()
651 return -EINVAL; in pcwd_ioctl()
660 return -ENOTTY; in pcwd_ioctl()
680 return -EFAULT; in pcwd_write()
693 return -EBUSY; in pcwd_open()
725 return -EFAULT; in pcwd_temp_read()
728 return -EFAULT; in pcwd_temp_read()
736 return -ENODEV; in pcwd_temp_open()
863 return -ENODEV; in pcwd_isa_probe()
867 pr_err("No I/O-Address for card detected\n"); in pcwd_isa_probe()
868 return -ENODEV; in pcwd_isa_probe()
881 ret = -EIO; in pcwd_isa_probe()
907 /* If heartbeat = 0 then we use the heartbeat from the dip-switches */ in pcwd_isa_probe()
935 pr_info("initialized. heartbeat=%d sec (nowayout=%d)\n", in pcwd_isa_probe()
948 cards_found--; in pcwd_isa_probe()
968 cards_found--; in pcwd_isa_remove()
994 MODULE_DESCRIPTION("Berkshire ISA-PC Watchdog driver");