From: Greg KH <gregkh@linuxfoundation.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Thierry Bultel <thierry.bultel@linatsea.fr>,
Thierry Bultel <thierry.bultel.yh@bp.renesas.com>,
"linux-renesas-soc@vger.kernel.org"
<linux-renesas-soc@vger.kernel.org>,
Paul Barker <paul.barker.ct@bp.renesas.com>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>
Subject: Re: [PATCH v7 10/13] serial: sh-sci: Add support for RZ/T2H SCI
Date: Tue, 15 Apr 2025 14:35:05 +0200 [thread overview]
Message-ID: <2025041535-devouring-drove-e173@gregkh> (raw)
In-Reply-To: <CAMuHMdV=1Hoo4b8jmKV2sE0VG2E4g=EUus_gfE8hdMvLag1pew@mail.gmail.com>
On Mon, Apr 14, 2025 at 04:07:23PM +0200, Geert Uytterhoeven wrote:
> Hi Greg,
>
> On Mon, 14 Apr 2025 at 11:32, Greg KH <gregkh@linuxfoundation.org> wrote:
> > On Mon, Apr 14, 2025 at 11:23:34AM +0200, Thierry Bultel wrote:
> > > Le 14/04/2025 à 10:58, Greg KH a écrit :
> > > > On Mon, Apr 14, 2025 at 07:54:12AM +0000, Thierry Bultel wrote:
> > > > > > From: Greg KH <gregkh@linuxfoundation.org>
> > > > > On Thu, Apr 03, 2025 at 11:29:12PM +0200, Thierry Bultel wrote:
> > > > > > > --- a/include/uapi/linux/serial_core.h
> > > > > > > +++ b/include/uapi/linux/serial_core.h
> > > > > > > @@ -231,6 +231,9 @@
> > > > > > > /* Sunplus UART */
> > > > > > > #define PORT_SUNPLUS 123
> > > > > > >
> > > > > > > +/* SH-SCI */
> > > > > > > +#define PORT_RSCI 124
> > > > > > Why do you need to tell userspace about this specific port? Is that a
> > > > > > hard requirement that your userspace tools require? If not, please don't
> > > > > > export this here.
> > > > > This point has been discussed with Geert and Wolfram.
> > > > > We cannot use PORT_GENERIC for this IP, and adding the new type
> > > > > is just keeping consistent with the sh-sci driver.
> > > > But, why does userspace need to know this number? And why doesn't
> > > > PORT_GENERIC work?
> > >
> > > The reason is that the sh-sci driver discriminates internally between port
> > > types.
> > > There are number of locations when it checks for PORT_SCI, PORT_SCIF,
> > > PORT_SCIFA...
> >
> > That is internal to the kernel, not external, right?
>
> Indeed.
>
> > > T2H SCI needs special handling, too, that is the reason why PORT_GENERIC
> > > cannot work. I just therefore added this new type.
> >
> > Again, why does userspace need to know this?
>
> I guess userspace does not need to know about this (does userspace
> actually care about any of these values, except for PORT_8250 and
> friends?).
>
> However, traditionally PORT_* has been used as the differentiator
> for serial port types in most drivers in the kernel (incl. sh-sci.c)
> as well. Just two drivers use PORT_GENERIC, and these are the ones
> that came with the introduction of PORT_GENERIC. Since the rsci driver
> is not a new driver, but a sub-driver of the existing sh-sci driver,
> I think it warrants keeping on using the type field, like before. Else
> it will have to become even more complex than it already is.
>
> Note I am fine with using a non-uapi value. Is there a PORT_* number
> range meant for internal (non-uapi) use?
We can just start putting them in a non-uapi file so that we don't have
to keep adding things to userspace that never needs it.
thanks,
greg k-h
next prev parent reply other threads:[~2025-04-15 12:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250403212919.1137670-1-thierry.bultel.yh@bp.renesas.com>
2025-04-03 21:29 ` [PATCH v7 03/13] dt-bindings: serial: Add compatible for Renesas RZ/T2H SoC in sci Thierry Bultel
2025-04-17 14:04 ` Geert Uytterhoeven
2025-04-03 21:29 ` [PATCH v7 07/13] serial: sh-sci: Fix a comment about SCIFA Thierry Bultel
2025-04-03 21:29 ` [PATCH v7 08/13] serial: sh-sci: Introduced function pointers Thierry Bultel
2025-04-03 21:29 ` [PATCH v7 09/13] serial: sh-sci: Introduced sci_of_data Thierry Bultel
2025-04-03 21:29 ` [PATCH v7 10/13] serial: sh-sci: Add support for RZ/T2H SCI Thierry Bultel
2025-04-11 14:57 ` Greg KH
2025-04-14 7:54 ` Thierry Bultel
2025-04-14 8:58 ` Greg KH
2025-04-14 9:23 ` Thierry Bultel
2025-04-14 9:32 ` Greg KH
2025-04-14 14:07 ` Geert Uytterhoeven
2025-04-15 12:35 ` Greg KH [this message]
2025-04-17 12:53 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2025041535-devouring-drove-e173@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=paul.barker.ct@bp.renesas.com \
--cc=thierry.bultel.yh@bp.renesas.com \
--cc=thierry.bultel@linatsea.fr \
--cc=wsa+renesas@sang-engineering.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox