I am working on the I2C-to-UART converter IC(SC16IS74XX), and I was able to communicate with an external UART port with software flow control and no flow control enabled. But when I configured the device UART port with hardware flow control, communication was not working out.
After debugging, I understood there is a bug in the sc16is7xx_set_baud and sc16is7xx_set_termios functions of the driver. We have two bugs that are causing the communication to fail with auto CTS and auto RTS enabled.
These are the changes I've made to get communication working with auto RTS and CTS enabled.
@@ -523,8 +523,13 @@ static sc16is7xx_set_baud()
/* Enable enhanced features */
- sc16is7xx_port_write(port, SC16IS7XX_EFR_REG, - SC16IS7XX_EFR_ENABLE_BIT); + /* using "update" instead of "write" to + * remove the bug ,which over writes the + * EFR register + */ + sc16is7xx_port_update(port, SC16IS7XX_EFR_REG, + SC16IS7XX_EFR_ENABLE_BIT | + SC16IS7XX_EFR_ENABLE_BIT ); regcache_cache_bypass(s->regmap, false);