Lines Matching +full:fine +full:- +full:ctr +full:- +full:bits

1 // SPDX-License-Identifier: GPL-2.0+
5 * (c) Copyright 1996-1997 Alan Cox <alan@lxorguk.ukuu.org.uk>,
10 * "AS-IS" and at no charge.
71 /* You must set these - there is no sane way to probe for this board. */
82 /* Support for the Fan Tachometer on the WDT501-P */
86 "WDT501-P Fan Tachometer support (0=disable, default=0)");
91 "WDT501-P Card type (500 or 501, default=500)");
97 static void wdt_ctr_mode(int ctr, int mode) in wdt_ctr_mode() argument
99 ctr <<= 6; in wdt_ctr_mode()
100 ctr |= 0x30; in wdt_ctr_mode()
101 ctr |= (mode << 1); in wdt_ctr_mode()
102 outb_p(ctr, WDT_CR); in wdt_ctr_mode()
105 static void wdt_ctr_load(int ctr, int val) in wdt_ctr_load() argument
107 outb_p(val&0xFF, WDT_COUNT0+ctr); in wdt_ctr_load()
108 outb_p(val>>8, WDT_COUNT0+ctr); in wdt_ctr_load()
166 wdt_ctr_mode(1, 2); /* Re-Program CTR1 for Mode 2: in wdt_ping()
178 * value is incorrect we keep the old value and return -EINVAL. If
185 return -EINVAL; in wdt_set_heartbeat()
196 * several board variants so we have to know which bits are valid. Some
197 * bits default to one and some to zero in order to be maximally painful.
199 * we then map the bits onto the status ioctl flags.
330 return -EFAULT; in wdt_write()
377 return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0; in wdt_ioctl()
388 return -EFAULT; in wdt_ioctl()
390 return -EINVAL; in wdt_ioctl()
396 return -ENOTTY; in wdt_ioctl()
415 return -EBUSY; in wdt_open()
465 return -EFAULT; in wdt_temp_read()
505 * trust me - if it happens it does suck.
564 * will not touch PC memory so all is fine. You just have to load a new
592 return -ENODEV; in wdt_init()
605 ret = -EBUSY; in wdt_init()
637 pr_info("WDT500/501-P driver 0.10 at 0x%04x (Interrupt %d). heartbeat=%d sec (nowayout=%d)\n", in wdt_init()