public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Benjamin Larsson <benjamin.larsson@genexis.eu>
Cc: linux-serial@vger.kernel.org, devicetree@vger.kernel.org,
	ansuelsmth@gmail.com, lorenzo@kernel.org
Subject: Re: [PATCH 2/2] serial: Airoha SoC UART and HSUART support
Date: Tue, 7 Jan 2025 11:44:24 +0100	[thread overview]
Message-ID: <2025010759-exodus-recast-70ea@gregkh> (raw)
In-Reply-To: <49278805-b667-40cf-9217-1c51eb80882a@genexis.eu>

On Mon, Jan 06, 2025 at 01:35:10PM +0100, Benjamin Larsson wrote:
> Hi.
> 
> > > > > diff --git a/include/uapi/linux/serial_core.h b/include/uapi/linux/serial_core.h
> > > > > index 9c007a106330..c71fb338accb 100644
> > > > > --- a/include/uapi/linux/serial_core.h
> > > > > +++ b/include/uapi/linux/serial_core.h
> > > > > @@ -231,6 +231,12 @@
> > > > >    /* Sunplus UART */
> > > > >    #define PORT_SUNPLUS 123
> > > > > 
> > > > > +/* Airoha UART */
> > > > > +#define PORT_AIROHA  124
> > > > > +
> > > > > +/* Airoha HSUART */
> > > > > +#define PORT_AIROHA_HS       125
> > > > 
> > > > Do you REALLY need these port definitions in userspace?  If so, what is
> > > > going to use them there?
> > > > 
> > > 
> > > Testing another PORT define gives this result:
> > > 
> > > grep -ri PORT_MTK_BTIF *
> > > 
> > > drivers/tty/serial/8250/8250_of.c:            .data = (void *)PORT_MTK_BTIF, },
> > > drivers/tty/serial/8250/8250_port.c:  [PORT_MTK_BTIF] = {
> > > include/uapi/linux/serial_core.h:#define PORT_MTK_BTIF        117
> > > 
> > > Per my understanding this is how the current code is designed to work.
> > 
> > That's a very old pattern, I'm asking you if you need this new number in
> > userspace, which is what you are doing here.  I'd prefer not to add new
> > values here as they are a pain to manage and we can never change them if
> > added.
> > 
> 
> I dont need it in userspace. I need it in serial8250_config uart_config[]
> that uses this header.

Then use something internal to the kernel please, and not exported to
userspace where it must never change for the next 50+ years :(

thanks,

greg k-h

  reply	other threads:[~2025-01-07 10:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-05 13:11 [PATCH 0/2] Airoha UART support Benjamin Larsson
2025-01-05 13:11 ` [PATCH 1/2] dt-bindings: serial: 8250: Add Airoha compatibles Benjamin Larsson
2025-01-06  7:16   ` Krzysztof Kozlowski
2025-01-05 13:11 ` [PATCH 2/2] serial: Airoha SoC UART and HSUART support Benjamin Larsson
2025-01-05 15:59   ` Greg KH
2025-01-05 20:44     ` Benjamin Larsson
2025-01-06  8:09       ` Greg KH
2025-01-06 12:35         ` Benjamin Larsson
2025-01-07 10:44           ` Greg KH [this message]
2025-01-06  7:19   ` Krzysztof Kozlowski
2025-01-06 15:58     ` Benjamin Larsson
  -- strict thread matches above, loose matches on Subject: below --
2025-01-11 13:22 [PATCH v2 0/2] Airoha UART support Benjamin Larsson
2025-01-11 13:22 ` [PATCH 2/2] serial: Airoha SoC UART and HSUART support Benjamin Larsson
2025-01-12 10:54   ` kernel test robot
2025-01-12 13:04   ` kernel test robot
2025-01-19 13:01 [PATCH v3 0/2] Airoha UART support Benjamin Larsson
2025-01-19 13:01 ` [PATCH 2/2] serial: Airoha SoC UART and HSUART support Benjamin Larsson
2025-02-09 21:02 [PATCH v4 0/2] Airoha UART support Benjamin Larsson
2025-02-09 21:02 ` [PATCH 2/2] serial: Airoha SoC UART and HSUART support Benjamin Larsson
2025-03-22 21:42   ` Andy Shevchenko
2025-03-25 14:19     ` Benjamin Larsson
2025-03-25 14:23       ` Andy Shevchenko

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=2025010759-exodus-recast-70ea@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=ansuelsmth@gmail.com \
    --cc=benjamin.larsson@genexis.eu \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=lorenzo@kernel.org \
    /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