Lines Matching full:mode

213 /* Terminate a negotiated mode. */
220 switch (port->ieee1284.mode) { in parport_ieee1284_terminate()
224 /* Terminate from EPP mode. */ in parport_ieee1284_terminate()
295 port->ieee1284.mode = IEEE1284_MODE_COMPAT; in parport_ieee1284_terminate()
298 pr_debug("%s: In compatibility (forward idle) mode\n", port->name); in parport_ieee1284_terminate()
303 * parport_negotiate - negotiate an IEEE 1284 mode
305 * @mode: mode to negotiate to
307 * Use this to negotiate to a particular IEEE 1284 transfer mode.
308 * The @mode parameter should be one of the constants in
312 * negotiation to the mode specified, -1 if the peripheral is not
317 int parport_negotiate (struct parport *port, int mode) in parport_negotiate() argument
320 if (mode == IEEE1284_MODE_COMPAT) in parport_negotiate()
325 int m = mode & ~IEEE1284_ADDR; in parport_negotiate()
332 if (port->ieee1284.mode == mode) in parport_negotiate()
336 if ((port->ieee1284.mode & ~IEEE1284_ADDR) == (mode & ~IEEE1284_ADDR)){ in parport_negotiate()
337 port->ieee1284.mode = mode; in parport_negotiate()
341 /* Go to compatibility forward idle mode */ in parport_negotiate()
342 if (port->ieee1284.mode != IEEE1284_MODE_COMPAT) in parport_negotiate()
345 if (mode == IEEE1284_MODE_COMPAT) in parport_negotiate()
346 /* Compatibility mode: no negotiation. */ in parport_negotiate()
349 switch (mode) { in parport_negotiate()
361 if (mode & IEEE1284_EXT_LINK) in parport_negotiate()
422 pr_debug("%s: Mode 0x%02x not supported? (0x%02x)\n", in parport_negotiate()
423 port->name, mode, port->ops->read_status (port)); in parport_negotiate()
431 if (mode && !xflag) { in parport_negotiate()
432 /* Mode not supported. */ in parport_negotiate()
433 pr_debug("%s: Mode 0x%02x rejected by peripheral\n", in parport_negotiate()
434 port->name, mode); in parport_negotiate()
440 if (mode & IEEE1284_EXT_LINK) { in parport_negotiate()
441 m = mode & 0x7f; in parport_negotiate()
470 pr_debug("%s: Mode 0x%02x not supported? (0x%02x)\n", in parport_negotiate()
471 port->name, mode, in parport_negotiate()
482 /* Extended mode not supported. */ in parport_negotiate()
483 pr_debug("%s: Extended mode 0x%02x not supported\n", in parport_negotiate()
484 port->name, mode); in parport_negotiate()
492 /* Mode is supported */ in parport_negotiate()
493 pr_debug("%s: In mode 0x%02x\n", port->name, mode); in parport_negotiate()
494 port->ieee1284.mode = mode; in parport_negotiate()
497 if (!(mode & IEEE1284_EXT_LINK) && (m & IEEE1284_MODE_ECP)) { in parport_negotiate()
515 } else switch (mode) { in parport_negotiate()
572 * specified, using the IEEE 1284 transfer mode most recently
574 * mode supports forward transfers (host to peripheral).
589 int mode = port->ieee1284.mode; in parport_write()
590 int addr = mode & IEEE1284_ADDR; in parport_write()
594 mode &= ~(IEEE1284_DEVICEID | IEEE1284_ADDR); in parport_write()
596 /* Use the mode we're in. */ in parport_write()
597 switch (mode) { in parport_write()
603 pr_debug("%s: Using compatibility mode\n", port->name); in parport_write()
608 pr_debug("%s: Using EPP mode\n", port->name); in parport_write()
616 pr_debug("%s: Using software-emulated EPP mode\n", port->name); in parport_write()
625 pr_debug("%s: Using ECP mode\n", port->name); in parport_write()
634 pr_debug("%s: Using software-emulated ECP mode\n", port->name); in parport_write()
645 pr_debug("%s: Unknown mode 0x%02x\n", in parport_write()
646 port->name, port->ieee1284.mode); in parport_write()
663 * specified, using the IEEE 1284 transfer mode most recently
665 * mode supports reverse transfers (peripheral to host).
680 int mode = port->physport->ieee1284.mode; in parport_read()
681 int addr = mode & IEEE1284_ADDR; in parport_read()
685 mode &= ~(IEEE1284_DEVICEID | IEEE1284_ADDR); in parport_read()
687 /* Use the mode we're in. */ in parport_read()
688 switch (mode) { in parport_read()
690 /* if we can tri-state use BYTE mode instead of NIBBLE mode, in parport_read()
691 * if that fails, revert to NIBBLE mode -- ought to store somewhere in parport_read()
692 * the device's ability to do BYTE mode reverse transfers, so we don't in parport_read()
697 /* got into BYTE mode OK */ in parport_read()
698 pr_debug("%s: Using byte mode\n", port->name); in parport_read()
707 pr_debug("%s: Using nibble mode\n", port->name); in parport_read()
712 pr_debug("%s: Using byte mode\n", port->name); in parport_read()
717 pr_debug("%s: Using EPP mode\n", port->name); in parport_read()
725 pr_debug("%s: Using software-emulated EPP mode\n", port->name); in parport_read()
734 pr_debug("%s: Using ECP mode\n", port->name); in parport_read()
739 pr_debug("%s: Using software-emulated ECP mode\n", port->name); in parport_read()
744 pr_debug("%s: Unknown mode 0x%02x\n", in parport_read()
745 port->name, port->physport->ieee1284.mode); in parport_read()