Lines Matching +full:ten +full:- +full:bit
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) */
129 /* 500ms for each 4 bit response (according to spec.) */
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="
227 /* The WCMD bit must be 1 and the command is only 4 bits in size */ in send_isa_command()
301 int one, ten, hund, minor; in pcwd_get_firmware() local
307 ten = send_isa_command(CMD_ISA_VERSION_TENTH); in pcwd_get_firmware()
311 one, ten, hund, minor); in pcwd_get_firmware()
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()
368 pr_info("No previous trip detected - Cold boot or reset\n"); in pcwd_show_card_info()
382 WD_WDRST bit in register 1 */ in pcwd_timer_ping()
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()
798 * The ISA cards have a heartbeat bit in one of the registers, which
799 * register is card dependent. The heartbeat bit is monitored, and if
836 /* Has either heartbeat bit changed? */ in pcwd_isa_match()
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()
948 cards_found--; in pcwd_isa_probe()
968 cards_found--; in pcwd_isa_remove()
994 MODULE_DESCRIPTION("Berkshire ISA-PC Watchdog driver");