[PATCH v2] serial: 8250_bcm2835aux: Add support for RTS/CTS auto flow control

Greg KH gregkh at linuxfoundation.org
Thu Oct 1 01:39:38 PDT 2026


On Thu, Oct 01, 2026 at 08:09:32AM +0200, Jiri Slaby wrote:
> On 30. 09. 26, 14:56, Jan Čermák wrote:
> > --- a/drivers/tty/serial/8250/8250_bcm2835aux.c
> > +++ b/drivers/tty/serial/8250/8250_bcm2835aux.c
> ...
> > @@ -46,6 +59,150 @@ struct bcm2835aux_data {
> >   	u32 cntl;
> >   };
> > +static bool bcm2835aux_tty_throttled(struct uart_port *port)
> > +{
> > +	struct tty_struct *tty;
> > +	bool throttled;
> > +
> > +	if (!port->state)
> > +		return false;
> > +
> > +	tty = tty_port_tty_get(&port->state->port);
> > +	throttled = tty && tty_throttled(tty);
> > +	tty_kref_put(tty);
> > +
> > +	return throttled;
> 
> Instead:
> 
> scoped_guard(tty_port_tty, port)
>    return tty_throttled(scoped_tty());
> 
> return false;

LLMs do not understand "modern" kernel programming styles :(



More information about the linux-arm-kernel mailing list