[patch 6/6] staging: speakup: Migrate acntsa, bns, dectlk and txprt to ttyio

Samuel Thibault samuel.thibault at ens-lyon.org
Sat Feb 25 21:59:30 EST 2017


Concerning speakup_apollo.c, it seems its only use of outb is to control
the modem RTS line. To support that, yet another step will be:

- introduce spk_serial_tiocmset(unsigned int set, unsigned int clear),
  which does:

  int old = inb(speakup_info.port_tts + UART_MCR);
  outb((old & ~clear) | set, speakup_info.port_tts + UART_MCR);

- introduce spk_ttyio_tiocmset(unsigned int set, unsigned int clear),
  which does:

  speakup_tty->ops->tiocmset(speakup_tty, set, clear);

and make them a tiocmset method of synths.

and then in speakup_apollo.c, instead of 

	outb(UART_MCR_DTR, speakup_info.port_tts + UART_MCR);
	outb(UART_MCR_DTR | UART_MCR_RTS,
			speakup_info.port_tts + UART_MCR);

rather use

	synth->tiocmset(0, UART_MCR_RTS);
	synth->tiocmset(UART_MCR_RTS, 0);

Samuel


More information about the Speakup mailing list