[PATCH] serial: imx: allow CRTSCTS with RTS/CTS GPIOs

Russell King (Oracle) linux at armlinux.org.uk
Thu Oct 16 08:21:15 PDT 2025


On Thu, Oct 16, 2025 at 01:37:30PM +0200, Matthias Schiffer wrote:
> -	if (!sport->have_rtscts)
> +	if (!sport->have_rtscts && !sport->have_rtsgpio)

This is fine...

> -	} else if (termios->c_cflag & CRTSCTS) {
> +	} else if ((termios->c_cflag & CRTSCTS) && sport->have_rtscts) {

This adds extra parens that do nothing to aid readability. Too many
parens actually hurt readability.

> -	if (termios->c_cflag & CRTSCTS)
> +	if ((termios->c_cflag & CRTSCTS) && sport->have_rtscts)

Same here.

Maybe change these to:

	if (sport->have_rtscts && termios->c_cflag & CRTSCTS)

?

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!



More information about the linux-arm-kernel mailing list