Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2202085rwd; Tue, 13 Jun 2023 22:32:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5diw9vpcGd6wwyQ66Hc//bYkEzQjgBpzZuo6iTqu6LMItac5oEYtkMdOUzXzBXR+vRybcg X-Received: by 2002:a05:6a20:7287:b0:111:92ef:314e with SMTP id o7-20020a056a20728700b0011192ef314emr552588pzk.35.1686720773484; Tue, 13 Jun 2023 22:32:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686720773; cv=none; d=google.com; s=arc-20160816; b=EmrZfRIc0ZHmDE/dBWCPu7kDo+N4Whwygm3aMtltLUx75B8AM9ujcmrpEas6+C1uTj tB2aZUYzoyViblnvj5uctC7jpLZRwPqcrOepJzGygnyQlNP1Ycq9Bvl6bWj1kJXbUu0B ilNNtwk6CBdnGiTE/0scWrb7glQda3uGBezVu7Yn4qkDd55jv+8P7Gacl5ILoP87SNSs QwDvfFV6dUZFcV8oMUSqnunOyZO+wcbN/3Vm1LnQIzG7S2Q5UaMhd3DEgjjmt4tYw5Qm uTEeJhhW9SQvyreQeRQdYlLyx8r7fuBziUOUwRLYt06iAay5n7W0jT6V6RE1QtgH7GCG LelA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=dVqjech6rehqYVc76kP00nVY02sE+W+4Mbw+HMfqJs0=; b=LgtP7NHclosW/M+dei11wl7FA7VSbz847XNFV8r1luq2NgmVfhV0dypcbWuITU4NY4 plsVkqQRl7NO1MMWBlG/kboE2/lanv6WQZb6YruVbV2BuLGupF8yC0aviyxHvxD95wIG 4nmo5dp8ngfQ4JooFzdrEsy948iAquh4btP8ljgv1DA4niw8rzhsibf168vOAEhCH/7z KkaAQmKKJkf8+yccw3QUjahgqzEhmO4KTvMv+Ux3BCe/+v8x7EFl3AY4kML1dWOxWCv5 up5gQaCT6GbRJFsNXV/sWGn2sQhWtHcWcu7Zj+YFCCusRi/IxtHWhp0bdlkNMSoAuhX/ xl9w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u11-20020a170902e5cb00b001b382b2d2efsi9028518plf.28.2023.06.13.22.32.37; Tue, 13 Jun 2023 22:32:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242141AbjFNE6E (ORCPT + 99 others); Wed, 14 Jun 2023 00:58:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233929AbjFNE6C (ORCPT ); Wed, 14 Jun 2023 00:58:02 -0400 Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54FEB122; Tue, 13 Jun 2023 21:58:01 -0700 (PDT) Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-5183101690cso7278085a12.0; Tue, 13 Jun 2023 21:58:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686718680; x=1689310680; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dVqjech6rehqYVc76kP00nVY02sE+W+4Mbw+HMfqJs0=; b=Thcyv3QWdwJGWETB8lfAa9kBrJ2ZtyTVrc5Z3F2XFS3cUpRlDwhB2OHvV7SiHvJEVY 7MchZaXrA6LAjxrbNxHVkiwkjtHIRvacz1T+B/oZG/cho15ieM7JB/Ir0ltE7kfxZ4/r UTSX61aGJVkEiuQZXLsg3t0qB/iCf+dZy9IywZgDUMQYeWEdFZImf2Fw7wgaQxeEB9IM bs8OuoS37p3cxajagnkHE8U44ivtj0TLB7n8Rv5cRF1LeyAUByf2xlvUIsZB3Y/WfJuZ YPcKhi010xcvAx3rryM7uBeKbDfqCBkYmOgffWAzWnleDIJzaiJbTTHbAVyukdnjMiVh BAxQ== X-Gm-Message-State: AC+VfDxr90wYI4swRG3UP4ukMr8J01MofnjS9BPcPY2/SoIZonD/yuwI D4QzHFRf/dNmHRYqtDGqwcw= X-Received: by 2002:a17:907:7e9a:b0:977:d468:827 with SMTP id qb26-20020a1709077e9a00b00977d4680827mr453941ejc.17.1686718679529; Tue, 13 Jun 2023 21:57:59 -0700 (PDT) Received: from ?IPV6:2a0b:e7c0:0:107::aaaa:59? ([2a0b:e7c0:0:107::aaaa:59]) by smtp.gmail.com with ESMTPSA id ha19-20020a170906a89300b0097d77a5f033sm5974327ejb.24.2023.06.13.21.57.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Jun 2023 21:57:58 -0700 (PDT) Message-ID: <11b0f59e-7cca-1b50-9c34-f38e6b6fc0f9@kernel.org> Date: Wed, 14 Jun 2023 06:57:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH v14 1/1] tty: serial: Add Nuvoton ma35d1 serial driver support Content-Language: en-US To: Arnd Bergmann , Greg Kroah-Hartman , Jacky Huang Cc: Rob Herring , krzysztof.kozlowski+dt@linaro.org, Lee Jones , Michael Turquette , Stephen Boyd , Philipp Zabel , 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 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> From: Jiri Slaby In-Reply-To: <35e768ad-7f15-48a4-9c38-09570026cf71@app.fastmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13. 06. 23, 17:44, Arnd Bergmann wrote: > On Tue, Jun 13, 2023, at 16:49, Greg KH wrote: >> On Tue, Jun 13, 2023 at 06:58:32PM +0800, Jacky Huang wrote: >>> >>> On 2023/6/13 下午 06:28, Greg KH wrote: >>>> On Mon, Jun 12, 2023 at 02:53:55AM +0000, Jacky Huang wrote: >>>>> From: Jacky Huang >>>>> >>>>> This adds UART and console driver for Nuvoton ma35d1 Soc. >>>>> It supports full-duplex communication, FIFO control, and >>>>> hardware flow control. >>>> You get a full 72 columns for your changelog :) >>>> >>>>> --- a/include/uapi/linux/serial_core.h >>>>> +++ b/include/uapi/linux/serial_core.h >>>>> @@ -279,4 +279,7 @@ >>>>> /* Sunplus UART */ >>>>> #define PORT_SUNPLUS 123 >>>>> +/* Nuvoton MA35 SoC */ >>>>> +#define PORT_MA35 124 >>>>> + >>>> Why is this change needed? What userspace code is going to rely on it? >>>> >>>> thanks, >>>> >>>> greg k-h >>> >>> Because the serial driver requires a port->type, and almost all serial >>> drivers defined their port type here. We follow the practice of most serial >>> drivers here. >>> If we don't do it this way, we would have to directly assign a value to >>> port->type. However, such modifications were questioned in the past, >>> which is why we changed it back to defining the port type in serial_core.h. >> >> I really really want to get rid of this list, as it's a UAPI that no one >> uses. So please don't use it, it doesn't help anything, and while the >> serial driver might require it, it doesn't actually do anything with >> that field, right? So why don't we just set all of the values to the >> same one? > > 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 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. > > - move all values used by the 8250 driver from serial_core.h > to serial.h, as this driver actually uses the constants. > > - Move the remaining contents of uapi/linux/serial.h into the > non-uapi version. > > - Change all drivers that only reference a single PORT_* > value to use the generic one. Hmm, we are looping :). https://lore.kernel.org/all/75375f8d-e157-a364-3da5-9c8d5b832927@kernel.org/ regards, -- js suse labs