set s/w flow control in serial driver


Adam yang

I write a serial driver, I want to set registers when set s/w flow control, so I write code in xxx_set_termios() like this:

if(((termios->c_iflag) & IXOFF)||((termios->c_iflag) & IXON))
// set EFR = EFR & 0xf0 | 0xa; branch 1
// set EFR = EFR & 0xf0; branch 2

I found when I set serial from none flow control to software flow control. Driver not enter branch 1,
and when I set serial from software flow control to none flow control, driver not enter branch 2.

I found function uart_set_termios() in serial_core.c, it dose not check IXON or IXOFF flag whether changed, so it not call xxx_set_termios() when only set s/w flow control.

Does I understand right? How do I set reigsters when set s/w flow control?

$100 Digital Ocean Credit
Get a free VM to test out Linux! Hosting Donations
Consider making a donation

Members online