From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Jacky Huang <ychuang570808@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
krzysztof.kozlowski+dt@linaro.org, Lee Jones <lee@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
Jiri Slaby <jirislaby@kernel.org>,
Tomer Maimon <tmaimon77@gmail.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
devicetree@vger.kernel.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-serial@vger.kernel.org, soc@kernel.org, schung@nuvoton.com,
mjchen@nuvoton.com, Jacky Huang <ychuang3@nuvoton.com>
Subject: Re: [PATCH v14 1/1] tty: serial: Add Nuvoton ma35d1 serial driver support
Date: Thu, 15 Jun 2023 17:00:21 +0200 [thread overview]
Message-ID: <2023061500-tipper-tightwad-8843@gregkh> (raw)
In-Reply-To: <502240f7-2cac-4fe6-9e27-f9861db3666d@app.fastmail.com>
On Thu, Jun 15, 2023 at 04:01:55PM +0200, Arnd Bergmann wrote:
> On Thu, Jun 15, 2023, at 12:19, Greg Kroah-Hartman wrote:
> > On Tue, Jun 13, 2023 at 05:44:23PM +0200, Arnd Bergmann wrote:
> >> On Tue, Jun 13, 2023, at 16:49, Greg KH wrote:
> >> I don't see how Jacky can come up with a patch to do this correctly
> >> without more specific guidance to what exactly you are looking for,
> >> after the last 123 people that added support for a new port got
> >> that merged.
> >
> > I keep complaining about this, when I notice it. Just use the "default"
> > port type in the serial driver and don't add a new type here and it
> > should just work, right?
> >
> >> I checked debian codesearch and found only three obscure packages that
> >> accidentally include this header instead of including linux/serial.h,
> >> a couple of lists of all kernel headers, and none that include it on
> >> purpose. I agree that this header should really not exist in uapi,
> >> but the question is what exactly to do about it.
> >>
> >> Possible changes would be:
> >>
> >> - add a special value PORT_* constant other than PORT_UNKNOWN that
> >> can be used by serial drivers instead of a unique value, and
> >> ensure that the serial core can handle drivers using it.
> >
> > Why do we need a special constant?
>
> The "default" value is 0, which translates to PORT_UNKNOWN, and the
> serial core code prevents this from working. I think Jacky tried
> to use this the last one or two times you commented on it, and
> it did not work.
Ah, thanks, that makes sense.
> Setting it to a plain '1' as Jacky suggested in his reply is the
> same as PORT_8250, which may or may not be a good choice here.
Odds are it would be fine :)
> Since the number is exported to userspace in serial_struct,
> it might be better to pick a new constant such as
>
> #define PORT_SERIAL_GENERIC (-1)
>
> in order to be less ambiguous. It's a signed integer, so -1
> would work here this would clearly be a special value, or
> another option might be to use 255 as something that is
> slightly less special but still recognizable as something
> that may have a special meaning.
A new constant would be good, 255 is nice, and then we can move everyone
to use it unless they can specifically show a reason why it will not
work for them.
I think originally this was used to do device-specific ioctls, right?
That shouldn't be happening anymore, hopefully...
thanks,
greg k-h
WARNING: multiple messages have this Message-ID (diff)
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Jacky Huang <ychuang570808@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
krzysztof.kozlowski+dt@linaro.org, Lee Jones <lee@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
Jiri Slaby <jirislaby@kernel.org>,
Tomer Maimon <tmaimon77@gmail.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
devicetree@vger.kernel.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-serial@vger.kernel.org, soc@kernel.org, schung@nuvoton.com,
mjchen@nuvoton.com, Jacky Huang <ychuang3@nuvoton.com>
Subject: Re: [PATCH v14 1/1] tty: serial: Add Nuvoton ma35d1 serial driver support
Date: Thu, 15 Jun 2023 17:00:21 +0200 [thread overview]
Message-ID: <2023061500-tipper-tightwad-8843@gregkh> (raw)
In-Reply-To: <502240f7-2cac-4fe6-9e27-f9861db3666d@app.fastmail.com>
On Thu, Jun 15, 2023 at 04:01:55PM +0200, Arnd Bergmann wrote:
> On Thu, Jun 15, 2023, at 12:19, Greg Kroah-Hartman wrote:
> > On Tue, Jun 13, 2023 at 05:44:23PM +0200, Arnd Bergmann wrote:
> >> On Tue, Jun 13, 2023, at 16:49, Greg KH wrote:
> >> I don't see how Jacky can come up with a patch to do this correctly
> >> without more specific guidance to what exactly you are looking for,
> >> after the last 123 people that added support for a new port got
> >> that merged.
> >
> > I keep complaining about this, when I notice it. Just use the "default"
> > port type in the serial driver and don't add a new type here and it
> > should just work, right?
> >
> >> I checked debian codesearch and found only three obscure packages that
> >> accidentally include this header instead of including linux/serial.h,
> >> a couple of lists of all kernel headers, and none that include it on
> >> purpose. I agree that this header should really not exist in uapi,
> >> but the question is what exactly to do about it.
> >>
> >> Possible changes would be:
> >>
> >> - add a special value PORT_* constant other than PORT_UNKNOWN that
> >> can be used by serial drivers instead of a unique value, and
> >> ensure that the serial core can handle drivers using it.
> >
> > Why do we need a special constant?
>
> The "default" value is 0, which translates to PORT_UNKNOWN, and the
> serial core code prevents this from working. I think Jacky tried
> to use this the last one or two times you commented on it, and
> it did not work.
Ah, thanks, that makes sense.
> Setting it to a plain '1' as Jacky suggested in his reply is the
> same as PORT_8250, which may or may not be a good choice here.
Odds are it would be fine :)
> Since the number is exported to userspace in serial_struct,
> it might be better to pick a new constant such as
>
> #define PORT_SERIAL_GENERIC (-1)
>
> in order to be less ambiguous. It's a signed integer, so -1
> would work here this would clearly be a special value, or
> another option might be to use 255 as something that is
> slightly less special but still recognizable as something
> that may have a special meaning.
A new constant would be good, 255 is nice, and then we can move everyone
to use it unless they can specifically show a reason why it will not
work for them.
I think originally this was used to do device-specific ioctls, right?
That shouldn't be happening anymore, hopefully...
thanks,
greg k-h
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-06-15 15:00 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-12 2:53 [PATCH v14 0/1] Introduce Nuvoton ma35d1 SoC Jacky Huang
2023-06-12 2:53 ` [PATCH v14 1/1] tty: serial: Add Nuvoton ma35d1 serial driver support Jacky Huang
2023-06-13 9:36 ` Ilpo Järvinen
2023-06-13 9:36 ` Ilpo Järvinen
2023-06-13 10:28 ` Greg KH
2023-06-13 10:28 ` Greg KH
2023-06-13 10:58 ` Jacky Huang
2023-06-13 10:58 ` Jacky Huang
2023-06-13 14:49 ` Greg KH
2023-06-13 14:49 ` Greg KH
2023-06-13 15:44 ` Arnd Bergmann
2023-06-13 15:44 ` Arnd Bergmann
2023-06-14 4:57 ` Jiri Slaby
2023-06-14 4:57 ` Jiri Slaby
2023-06-15 10:19 ` Greg Kroah-Hartman
2023-06-15 10:19 ` Greg Kroah-Hartman
2023-06-15 10:46 ` Jacky Huang
2023-06-15 10:46 ` Jacky Huang
2023-06-15 11:11 ` Greg Kroah-Hartman
2023-06-15 11:11 ` Greg Kroah-Hartman
2023-06-15 14:01 ` Arnd Bergmann
2023-06-15 14:01 ` Arnd Bergmann
2023-06-15 15:00 ` Greg Kroah-Hartman [this message]
2023-06-15 15:00 ` Greg Kroah-Hartman
2023-06-15 16:11 ` Arnd Bergmann
2023-06-15 16:11 ` Arnd Bergmann
2023-06-13 10:29 ` Greg KH
2023-06-13 10:29 ` Greg KH
2023-06-13 11:03 ` Jacky Huang
2023-06-13 11:03 ` Jacky Huang
2023-06-13 14:48 ` Greg KH
2023-06-13 14:48 ` Greg KH
2023-06-14 1:18 ` Jacky Huang
2023-06-14 1:18 ` Jacky Huang
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=2023061500-tipper-tightwad-8843@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=jirislaby@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=mjchen@nuvoton.com \
--cc=mturquette@baylibre.com \
--cc=p.zabel@pengutronix.de \
--cc=robh+dt@kernel.org \
--cc=sboyd@kernel.org \
--cc=schung@nuvoton.com \
--cc=soc@kernel.org \
--cc=tmaimon77@gmail.com \
--cc=will@kernel.org \
--cc=ychuang3@nuvoton.com \
--cc=ychuang570808@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.