From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DE02DEB64D9 for ; Thu, 15 Jun 2023 14:02:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:Cc:To:From:Date:References: In-Reply-To:Message-Id:Mime-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fMgmPrjYHUUiUxQlT2FD+iMPH2Km15ETgF30CEbRp9M=; b=Gv0KYkAUvim2gW oYXPe+1p1PEX15iDlWfQ0nE/VGmtuMi7pv/Vw3te7fUXhljLY/RmhIX8+jt8u9/GP0+MtacbC79Pm bdAEELuUOt4fx7JfYSJtaPvpcixqjVlIlzEJxFFpGDtVjJLnTnRbOP7X99rHQBIecYUgo/l0Y8v4s 13HxZ+TTggp2EeGbGSR/47HEs3UlLTVQGeh6M/nTvFX1H0dwY4xsnPiFI+7x4aCm0tAFNSU7O3Nx2 77uRHMBVASDWw5dEjgNZOvJTty93pxImtIl6mfMRCE3SR7MPz1J9Cm6kD69WYCKK3smQggHuOMROQ WqQTxiZnN2Ap1mnvwknw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q9nYT-00F4yJ-2N; Thu, 15 Jun 2023 14:02:29 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q9nYQ-00F4wk-1q for linux-arm-kernel@lists.infradead.org; Thu, 15 Jun 2023 14:02:27 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 3A0905C00D8; Thu, 15 Jun 2023 10:02:17 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Thu, 15 Jun 2023 10:02:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1686837737; x=1686924137; bh=eY CsNbwSpZasMtX08Ox/O4cr7nckW5aMGHyiTHaMEvU=; b=vOzobmNPGCa6Mb+YMn asY4+o4H7LWFlBlorgzjotB25hUrMvqvukGFrvIOFTYkNkmBCFfkfYb7X6imkzfn sML3mf0MEl+OOFAzv6L0+9AuUaTQic/O3l7J/Um+a/XK/7TQ3dK9jE23HkDJV3Vs tDR4Cptq7Fgq6dS47eJsrpRHBCMYlX0sI0Td+Q7oFfoVuMaf0cMmk4mZGTrOZpYO 0rMG2r1EEBy5j9jm1bkbitkBDqQTPnwcL4WNXUNHHbhTVXFMjTwseb2LBCgUEp/1 +s+r4qww3/aMPqDMeUtP5In77D7fY0JN1JnDwlhLQ//7UetfJyigloRfTgfH3qFG V+Fg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1686837737; x=1686924137; bh=eYCsNbwSpZasM tX08Ox/O4cr7nckW5aMGHyiTHaMEvU=; b=RSjrdEsgeakMj9X0uhMrA2PN8j4Rw pWXc64Yh1QUJkZeWJkSnJ0wQsjdXWC/3XpGIHvmkTcOdt0VT+5p3Xd6K+WSijJZD P9QRahEgKUIIR6zj5ENb/as3xq4x6AqDJw4/GMYKH7b+N/YNAtxKum1MSPXLflPG m+HlPmtoy7O2mEY7LLNS57KYNliFt1xshKmL9IOluY5EiwB7aXhrahSgQhyPoY5q 6VwOrvtNtqhDyTOc2qBbMDmGt9vkhZgEglyYMXiiMxdFV2KpT+lH4lAnZz1lUxWM W0mHLLlOQST/9FfJJb2bpnMmrnrSx7xM+VZOqpQpE1UAmfOmbdFqxZq5A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgedvvddgieejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepffehueegteeihfegtefhjefgtdeugfegjeelheejueethfefgeeghfektdek teffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 6F440B60089; Thu, 15 Jun 2023 10:02:15 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-496-g8c46984af0-fm-20230615.001-g8c46984a Mime-Version: 1.0 Message-Id: <502240f7-2cac-4fe6-9e27-f9861db3666d@app.fastmail.com> In-Reply-To: <2023061555-enlighten-worshiper-c92d@gregkh> References: <20230612025355.547871-1-ychuang570808@gmail.com> <20230612025355.547871-2-ychuang570808@gmail.com> <2023061338-lunchbox-snorkel-e6a9@gregkh> <2023061356-matchbook-footwear-d142@gregkh> <35e768ad-7f15-48a4-9c38-09570026cf71@app.fastmail.com> <2023061555-enlighten-worshiper-c92d@gregkh> Date: Thu, 15 Jun 2023 16:01:55 +0200 From: "Arnd Bergmann" To: "Greg Kroah-Hartman" Cc: "Jacky Huang" , "Rob Herring" , krzysztof.kozlowski+dt@linaro.org, "Lee Jones" , "Michael Turquette" , "Stephen Boyd" , "Philipp Zabel" , "Jiri Slaby" , "Tomer Maimon" , "Catalin Marinas" , "Will Deacon" , 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" Subject: Re: [PATCH v14 1/1] tty: serial: Add Nuvoton ma35d1 serial driver support X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230615_070226_693515_1F7B2BB2 X-CRM114-Status: GOOD ( 22.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. 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. 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. Arnd _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel