Closed qianfan-Zhao closed 5 years ago
Hi @qianfan-Zhao ,
Would you like to send a pull request? Or you prefer I make the change directly?
Sincerely,
Yi-An Chen
I found there has 2 file, nuc970_serial.c and nuc970_serial-dt.c. I only change nuc970-serial-dt.c.
Please check this issue and change it directly.
Fixed. Thanks.
Current the kernel code has a bug when config serial port as RS485 mode.
Although we already clear LEV_RTS(0X200) bit based on SER_RS485_RTS_ON_SEND flag, but after that, when we try open serial port and write sometings, LEV_RTS are setted again.
I had traced the kernel and found we set this bit in nuc970serial_set_mctrl.
This function doesn't check if we are in RS485 mode, may set LEV_RTS again, even if we clear that flag in rs485_config.
Next is a patch can solve this problem: