From: Jiri Slaby <jirislaby@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>,
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>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Tomer Maimon <tmaimon77@gmail.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>
Cc: 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 v11 10/10] tty: serial: Add Nuvoton ma35d1 serial driver support
Date: Thu, 25 May 2023 07:48:45 +0200 [thread overview]
Message-ID: <75375f8d-e157-a364-3da5-9c8d5b832927@kernel.org> (raw)
In-Reply-To: <e312b861-a5cc-43b0-b2b0-7d66f47a3d0b@app.fastmail.com>
On 24. 05. 23, 11:00, Arnd Bergmann wrote:
> On Wed, May 24, 2023, at 10:34, Jacky Huang wrote:
>> On 2023/5/24 下午 03:42, Jiri Slaby wrote:
>>> On 16. 05. 23, 9:52, Jacky Huang wrote:
>>>> +static void ma35d1serial_config_port(struct uart_port *port, int flags)
>>>> +{
>>>> + /*
>>>> + * Driver core for serial ports forces a non-zero value for port
>>>> type.
>>>> + * Write an arbitrary value here to accommodate the serial core
>>>> driver,
>>>> + * as ID part of UAPI is redundant.
>>>> + */
>>>> + port->type = 1;
>>>
>>> So this 1 translates to PORT_8250. Why not to use it directly? Or
>>> something more saner like PORT_16550A?
>>>
>> It's not actually 8250 or 16550A.
>> Can we add the following definition to
>> 'include/uapi/linux/serial_core.h' and use PORT_MA35 instead?
>>
>> #define PORT_MA35 124
>
> This was already in a previous version, until Greg commented
> that it was probably not needed:
>
> https://lore.kernel.org/lkml/20fc81c9-5517-ce1e-639a-3b425cf27759@gmail.com/
>
> Since leaving port->type at PORT_UNKNOWN doesn't work, and almost
> all other drivers have something in serial_core.h, it's probably
> best to do the same here. Checking the other drivers showed that
> drivers/tty/serial/lantiq.c is currently the only exception, it
> defines PORT_LTQ_ASC locally, which causes a conflict with
> PORT_SPRD.
Hmm.
Anyone has an idea what this is really used for in userspace? Can we
replace all of them by simply some sort of "PORT_OTHER"?
For example:
xdg-open `echo -n 'https://codesearch.debian.net/search?q=\b('; sed -n
's@#define\s\(\w\+\)\s.*@\1@ p' include/uapi/linux/serial_core.h | tail
-20 | sed 's@.* \(.*\)[\x09 ][\x09 ]*.*@\1@'|paste -sd'|' | tr -d '\n';
echo ')\b'`
gives _no_ clue. FTR the above translates here into:
https://codesearch.debian.net/search?q=\b(PORT_HSCIF|PORT_ASC|PORT_TILEGX|PORT_MEN_Z135|PORT_SC16IS7XX|PORT_MESON|PORT_DIGICOLOR|PORT_SPRD|PORT_CRIS|PORT_STM32|PORT_MVEBU|PORT_PIC32|PORT_MPS2UART|PORT_MTK_BTIF|PORT_RDA|PORT_MLB_USIO|PORT_SIFIVE_V0|PORT_SUNIX|PORT_LINFLEXUART|PORT_SUNPLUS)\b
thanks,
--
js
suse labs
next prev parent reply other threads:[~2023-05-25 5:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-16 7:52 [PATCH v11 00/10] Introduce Nuvoton ma35d1 SoC Jacky Huang
2023-05-16 7:52 ` [PATCH v11 01/10] arm64: Kconfig.platforms: Add config for Nuvoton MA35 platform Jacky Huang
2023-05-16 7:52 ` [PATCH v11 02/10] arm64: defconfig: Add support for Nuvoton MA35 family SoCs Jacky Huang
2023-05-16 7:52 ` [PATCH v11 03/10] dt-bindings: clock: nuvoton: add binding for ma35d1 clock controller Jacky Huang
2023-05-16 7:52 ` [PATCH v11 04/10] dt-bindings: reset: nuvoton: Document ma35d1 reset control Jacky Huang
2023-05-16 7:52 ` [PATCH v11 05/10] dt-bindings: arm: Add initial bindings for Nuvoton platform Jacky Huang
2023-05-16 7:52 ` [PATCH v11 06/10] dt-bindings: serial: Document ma35d1 uart controller Jacky Huang
2023-05-16 7:52 ` [PATCH v11 07/10] arm64: dts: nuvoton: Add initial ma35d1 device tree Jacky Huang
2023-05-16 7:52 ` [PATCH v11 08/10] clk: nuvoton: Add clock driver for ma35d1 clock controller Jacky Huang
2023-05-16 7:52 ` [PATCH v11 09/10] reset: Add Nuvoton ma35d1 reset driver support Jacky Huang
2023-05-16 7:52 ` [PATCH v11 10/10] tty: serial: Add Nuvoton ma35d1 serial " Jacky Huang
2023-05-24 7:42 ` Jiri Slaby
2023-05-24 8:34 ` Jacky Huang
2023-05-24 9:00 ` Arnd Bergmann
2023-05-25 5:48 ` Jiri Slaby [this message]
2023-05-30 1:09 ` Jacky Huang
2023-05-30 5:35 ` Jiri Slaby
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=75375f8d-e157-a364-3da5-9c8d5b832927@kernel.org \
--to=jirislaby@kernel.org \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).