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 X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BF9CC47089 for ; Thu, 27 May 2021 02:58:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3AC83613CA for ; Thu, 27 May 2021 02:58:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232134AbhE0DAU (ORCPT ); Wed, 26 May 2021 23:00:20 -0400 Received: from twspam01.aspeedtech.com ([211.20.114.71]:50547 "EHLO twspam01.aspeedtech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229939AbhE0DAU (ORCPT ); Wed, 26 May 2021 23:00:20 -0400 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 14R2jfcU078610; Thu, 27 May 2021 10:45:41 +0800 (GMT-8) (envelope-from steven_lee@aspeedtech.com) Received: from aspeedtech.com (192.168.100.253) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 27 May 2021 10:58:43 +0800 Date: Thu, 27 May 2021 10:58:37 +0800 From: Steven Lee To: Jeremy Kerr CC: Linus Walleij , Bartosz Golaszewski , Rob Herring , Joel Stanley , Andrew Jeffery , "open list:GPIO SUBSYSTEM" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , open list , "Hongweiz@ami.com" , Ryan Chen , Billy Tsai Subject: Re: [PATCH v1 1/4] dt-bindings: aspeed-sgpio: Convert txt bindings to yaml. Message-ID: <20210527025836.GD9971@aspeedtech.com> References: <20210526094609.14068-1-steven_lee@aspeedtech.com> <20210526094609.14068-2-steven_lee@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [192.168.100.253] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 14R2jfcU078610 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The 05/27/2021 09:42, Jeremy Kerr wrote: > Hi Steven, > > > SGPIO bindings should be converted as yaml format. > > In addition to the file conversion, a new property max-ngpios is > > added in the yaml file as well. > > The new property is required by the enhanced sgpio driver for > > making the configuration of the max number of gpio pins more > > flexible. > > There are a number of things going on here - you're doing the YAML > conversion, introducing the max-gpios property, and changing the > compatible value. > > The first two make sense, but may be better split into separate > changes, so that the YAML conversion is a "linear" change. > Thanks for your suggestion, I will split them into 2 patches. > I'm not clear on why you're changing the compatible value though, > particularly as you're dropping support for the existing compatible > value anyway. How about we keep the old one, and use the default of 128 > for cases where max-ngpios is absent? That way, we retain support for > the existing device trees. > AST2600 support both SGPIO master and slave interfaces. So we decide to rename sgpio to sgpiom as it is the driver for sgpio master interface. Since Andrew also point out the compatibility issues, I will modify driver to keep the original design. > > +  max-ngpios: > > +    description: > > +      represents the number of actual hardware-supported GPIOs (ie, > > +      slots within the clocked serial GPIO data). Since each HW GPIO is both an > > +      input and an output, we provide max_ngpios * 2 lines on our gpiochip > > +      device. We also use it to define the split between the inputs and > > +      outputs; the inputs start at line 0, the outputs start at max_ngpios. > > Most of this description is better suited to the ngpios property, which > controls the number of lines that the gpiochip will expose. > > Also, minor nit: max_ngpios -> max-ngpios. > > How about something like: > > ngpios: > description: > Number of GPIO lines to expose. Since each HW GPIO is an input and an > output, we provide ngpios * 2 lines on our chip device. We also use it > to define the split between the inputs and outputs; the inputs start at > line 0, the outputs start at ngpios. > > max-ngpios: > description: > Represents the number of actual hardware-supported GPIOs (ie, slots within > the clocked serial GPIO data), and therefore the maximum value for > the ngpios property > I will modify the description as you suggested. > > +    minimum: 0 > > +    maximum: 128 > > Will this be the case for all (future) hardware? Can we leave this > unbound? > Since the future hardware may supports more gpios, I will remove it. > Cheers, > > > Jeremy > 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 X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BEBADC47082 for ; Thu, 27 May 2021 03:00:46 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 802B16100C for ; Thu, 27 May 2021 03:00:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 802B16100C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aspeedtech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=bdgdNTBkHpAhUIpgJdLog+wmQFp3NF3BvjpGYQn/JkU=; b=YIpDcQRkISI3vJ s0Ehd4M3iJkPow16s1/VFrFBtx/sKNUm8+xV6EixFJ+bL1mOgw1p+4fz/tsp2KPG06k4WVKlT0Jei dM8TTe1w4NdBEE8wpHtej9m1+pHU5VTtLjgHZF6UaAinSYjE1uLbx2d2WiFA7eTLj0ab+3PKjTYGw gQ5+T7ruqPbCjW6PlK70E+WvkfpMdbaF6xIcUKyBHqLcnuJQ7VfrS0ax/5XaBcz6DxLy9LmjD6Htb s+k+yhT00jq19x3RKpQstORDr+GJTyXKS6umXSTyJNhoMANN65O5R1XMKbtNJj/IIAdglMp6bRPDa Dwv027ecIpKRFzPWAMVA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lm6En-001wGE-Oc; Thu, 27 May 2021 02:59:09 +0000 Received: from twspam01.aspeedtech.com ([211.20.114.71]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lm6Ej-001wEw-Io for linux-arm-kernel@lists.infradead.org; Thu, 27 May 2021 02:59:07 +0000 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 14R2jfcU078610; Thu, 27 May 2021 10:45:41 +0800 (GMT-8) (envelope-from steven_lee@aspeedtech.com) Received: from aspeedtech.com (192.168.100.253) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 27 May 2021 10:58:43 +0800 Date: Thu, 27 May 2021 10:58:37 +0800 From: Steven Lee To: Jeremy Kerr CC: Linus Walleij , Bartosz Golaszewski , Rob Herring , Joel Stanley , Andrew Jeffery , "open list:GPIO SUBSYSTEM" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , open list , "Hongweiz@ami.com" , Ryan Chen , Billy Tsai Subject: Re: [PATCH v1 1/4] dt-bindings: aspeed-sgpio: Convert txt bindings to yaml. Message-ID: <20210527025836.GD9971@aspeedtech.com> References: <20210526094609.14068-1-steven_lee@aspeedtech.com> <20210526094609.14068-2-steven_lee@aspeedtech.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [192.168.100.253] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 14R2jfcU078610 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210526_195906_064991_CCCBB59B X-CRM114-Status: GOOD ( 29.05 ) 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="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org VGhlIDA1LzI3LzIwMjEgMDk6NDIsIEplcmVteSBLZXJyIHdyb3RlOgo+IEhpIFN0ZXZlbiwKPiAK PiA+IFNHUElPIGJpbmRpbmdzIHNob3VsZCBiZSBjb252ZXJ0ZWQgYXMgeWFtbCBmb3JtYXQuCj4g PiBJbiBhZGRpdGlvbiB0byB0aGUgZmlsZSBjb252ZXJzaW9uLCBhIG5ldyB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