Lines Matching defs:index

201  * index	- sub-device index, or -1 for 'all'
204 static void cpwd_toggleintr(struct cpwd *p, int index, int enable)
208 (index == -1) ?
210 (p->devs[index].intr_mask);
223 static void cpwd_resetbrokentimer(struct cpwd *p, int index)
225 cpwd_toggleintr(p, index, WD_INTR_ON);
226 cpwd_writew(WD_BLIMIT, p->devs[index].regs + WD_LIMIT);
262 static void cpwd_pingtimer(struct cpwd *p, int index)
264 if (cpwd_readb(p->devs[index].regs + WD_STATUS) & WD_S_RUNNING)
265 cpwd_readw(p->devs[index].regs + WD_DCNTR);
272 static void cpwd_stoptimer(struct cpwd *p, int index)
274 if (cpwd_readb(p->devs[index].regs + WD_STATUS) & WD_S_RUNNING) {
275 cpwd_toggleintr(p, index, WD_INTR_OFF);
278 p->devs[index].runstatus |= WD_STAT_BSTOP;
291 static void cpwd_starttimer(struct cpwd *p, int index)
294 p->devs[index].runstatus &= ~WD_STAT_BSTOP;
296 p->devs[index].runstatus &= ~WD_STAT_SVCD;
298 cpwd_writew(p->devs[index].timeout, p->devs[index].regs + WD_LIMIT);
299 cpwd_toggleintr(p, index, WD_INTR_ON);
302 static int cpwd_getstatus(struct cpwd *p, int index)
304 unsigned char stat = cpwd_readb(p->devs[index].regs + WD_STATUS);
305 unsigned char intr = cpwd_readb(p->devs[index].regs + PLD_IMASK);
316 if (intr & p->devs[index].intr_mask) {
331 (p->devs[index].runstatus & WD_STAT_BSTOP)) {
332 if (p->devs[index].runstatus & WD_STAT_SVCD) {
346 if (p->devs[index].runstatus & WD_STAT_SVCD)
415 int index = iminor(inode) - WD0_MINOR;
433 cpwd_pingtimer(p, index);
443 cpwd_stoptimer(p, index);
445 cpwd_starttimer(p, index);
453 setopt = cpwd_getstatus(p, index);
459 cpwd_starttimer(p, index);
466 cpwd_stoptimer(p, index);
486 int index = iminor(inode);
489 cpwd_pingtimer(p, index);