[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aC2yYDpsv7ef9IVA@shikoro>
Date: Wed, 21 May 2025 13:00:48 +0200
From: Wolfram Sang <wsa+renesas@...g-engineering.com>
To: Thierry Bultel <thierry.bultel.yh@...renesas.com>
Cc: thierry.bultel@...atsea.fr, linux-renesas-soc@...r.kernel.org,
geert@...ux-m68k.org, paul.barker.ct@...renesas.com,
linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org
Subject: Re: [PATCH v9 06/10] serial: sh-sci: Use private port ID
On Thu, May 15, 2025 at 04:18:21PM +0200, Thierry Bultel wrote:
> New port types cannot be added in serial_core.h, which is shared with
> userspace.
> In order to support new port types, the coming new ones will have
> BIT(7) set in the id value, and in this case, uartport->type is
> set to PORT_GENERIC.
> This commit therefore changes all the places where the port type is
> read, by not relying on uartport->type but on the private
> value stored in struct sci_port.
I quite like this approach to become independent of serial_core.h by
adding a driver-local type. Because it changes only access to the
variables but not much the logic of this driver. Two high level comments
I do have:
- I'd go for bit 31 as the flag, though. It is extremly unlikely that we
ever need a number in serial_core.h again, but if, it could likely be
> 127
- whatever bit numer we choose, it should be hidden as a constant. My
suggestion:
#define SCI_LOCAL_PORT_FLAG BIT(x)
?
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists