[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<TY3PR01MB113465BD7729BCD245D7FFF8186DEA@TY3PR01MB11346.jpnprd01.prod.outlook.com>
Date: Wed, 26 Nov 2025 08:29:54 +0000
From: Biju Das <biju.das.jz@...renesas.com>
To: geert <geert@...ux-m68k.org>, biju.das.au <biju.das.au@...il.com>
CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Jiri Slaby
<jirislaby@...nel.org>, Rob Herring <robh@...nel.org>, Krzysztof Kozlowski
<krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, Geert Uytterhoeven
<geert+renesas@...der.be>, magnus.damm <magnus.damm@...il.com>, wsa+renesas
<wsa+renesas@...g-engineering.com>, Prabhakar Mahadev Lad
<prabhakar.mahadev-lad.rj@...renesas.com>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "linux-serial@...r.kernel.org"
<linux-serial@...r.kernel.org>, "devicetree@...r.kernel.org"
<devicetree@...r.kernel.org>, "linux-renesas-soc@...r.kernel.org"
<linux-renesas-soc@...r.kernel.org>
Subject: RE: [PATCH v4 02/16] serial: sh-sci: Add sci_is_fifo_type()
Hi Geert Uytterhoeven,
Thanks for the feedback.
> -----Original Message-----
> From: Geert Uytterhoeven <geert@...ux-m68k.org>
> Sent: 26 November 2025 08:00
> Subject: Re: [PATCH v4 02/16] serial: sh-sci: Add sci_is_fifo_type()
>
> Hi Biju,
>
> On Tue, 25 Nov 2025 at 16:06, Biju <biju.das.au@...il.com> wrote:
> > From: Biju Das <biju.das.jz@...renesas.com>
> >
> > Add sci_is_fifo_type() helper for SCI operates in FIFO mode to
> > simplify the code in probe() and remove().
> >
> > Signed-off-by: Biju Das <biju.das.jz@...renesas.com>
>
> Thanks for your patch!
>
> > --- a/drivers/tty/serial/sh-sci.c
> > +++ b/drivers/tty/serial/sh-sci.c
> > @@ -3546,6 +3546,12 @@ static struct uart_driver sci_uart_driver = {
> > .cons = SCI_CONSOLE,
> > };
> >
> > +static bool sci_is_fifo_type(u8 type)
>
> sci_has_fifo?
OK.
>
> > +{
> > + return (type == PORT_SCIFA || type == PORT_SCIFB ||
> > + type == PORT_HSCIF || type == SCI_PORT_RSCI); }
> > +
> > static void sci_remove(struct platform_device *dev) {
> > struct sci_port *s = platform_get_drvdata(dev); @@ -3556,8
> > +3562,7 @@ static void sci_remove(struct platform_device *dev)
> >
> > if (s->port.fifosize > 1)
> > device_remove_file(&dev->dev, &dev_attr_rx_fifo_trigger);
> > - if (type == PORT_SCIFA || type == PORT_SCIFB || type == PORT_HSCIF ||
> > - type == SCI_PORT_RSCI)
> > + if (sci_is_fifo_type(type))
> > device_remove_file(&dev->dev,
> > &dev_attr_rx_fifo_timeout);
>
> I am wondering if we could just check for s->port.fifosize > 1 instead, and thus combine with the
> above check? We do have to fill in .set_rtg = rsci_scif_set_rtrg first, but are there other hurdles
> to take?
The SCIFA interface on RZ/G2L use PORT_SCIF, so these device files are not populated on those SoCs.
By adding check for s->port.fifosize > 1 it will be taken care.
Cheers,
Biju
Powered by blists - more mailing lists