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: > > > Hi Greg, > > > > > > > -----Original Message----- > > > > From: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> > > > > Sent: vendredi 11 avril 2025 16:57 > > > > To: Thierry Bultel <thierry.bultel.yh@xxxxxxxxxxxxxx> > > > > Cc: thierry.bultel@xxxxxxxxxxx; linux-renesas-soc@xxxxxxxxxxxxxxx; > > > > geert@xxxxxxxxxxxxxx; Paul Barker <paul.barker.ct@xxxxxxxxxxxxxx>; Wolfram > > > > Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>; linux-kernel@xxxxxxxxxxxxxxx; > > > > linux-serial@xxxxxxxxxxxxxxx > > > > Subject: Re: [PATCH v7 10/13] serial: sh-sci: Add support for RZ/T2H SCI > > > > > > > > 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? > 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? thanks, greg k-h