Lines Matching +full:re +full:- +full:sampling
1 // SPDX-License-Identifier: GPL-2.0-only
2 /* riowd.c - driver for hw watchdog inside Super I/O of RIO
28 * trigger a power-on reset when the signal is asserted. The BBC
32 * 0x05 (WDTO_INDEX) which is the watchdog time-out in minutes (1-255).
35 * re-set the watchdog else it will trigger.
39 * the watchdog control and can be used to make the watchdog timer re-set
41 * index 0x07 is merely a sampling of the line from the watchdog to the
71 spin_lock_irqsave(&p->lock, flags); in riowd_writereg()
72 writeb(index, p->regs + 0); in riowd_writereg()
73 writeb(val, p->regs + 1); in riowd_writereg()
74 spin_unlock_irqrestore(&p->lock, flags); in riowd_writereg()
103 return -EFAULT; in riowd_ioctl()
109 return -EFAULT; in riowd_ioctl()
118 return -EFAULT; in riowd_ioctl()
125 return -EINVAL; in riowd_ioctl()
131 return -EFAULT; in riowd_ioctl()
133 return -EINVAL; in riowd_ioctl()
142 return -EINVAL; in riowd_ioctl()
179 int err = -EINVAL; in riowd_probe()
184 err = -ENOMEM; in riowd_probe()
185 p = devm_kzalloc(&op->dev, sizeof(*p), GFP_KERNEL); in riowd_probe()
189 spin_lock_init(&p->lock); in riowd_probe()
191 p->regs = of_ioremap(&op->resource[0], 0, 2, DRIVER_NAME); in riowd_probe()
192 if (!p->regs) { in riowd_probe()
206 riowd_timeout, p->regs); in riowd_probe()
213 of_iounmap(&op->resource[0], p->regs, 2); in riowd_probe()
224 of_iounmap(&op->resource[0], p->regs, 2); in riowd_remove()