Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp208447pxj; Wed, 26 May 2021 20:49:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw78dDnZNnE+5OKJKh0dzVQBAuLSL55945AKhYj60U+ZtnfDleIKE2VA7flu6cmm/q0AMd2 X-Received: by 2002:a17:906:eb8d:: with SMTP id mh13mr1590960ejb.203.1622087361642; Wed, 26 May 2021 20:49:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622087361; cv=none; d=google.com; s=arc-20160816; b=kFoqOaEg39X8LBtGcTOtlYrPw+cFNtQZfgFV86aWmWtd8yY2DrhpJ10QvAiVwdcmTD Iw7xbkZSQXUwbYDTPSdAGBHnQfkdtEviChBID6JNbL1G9urRV5Y31aY3G4Lr2C4u94yN iiXdDTXlO3dZNvmIDISfQvI5bUYEcfE9O/sIvuxM+hokLCLGL5YMLwLxW9MEMRoEwH+j JS2J3mRy/DAVQjdo9IMgFiLcCt2zwFEQx4Ugxq04L1LpAucnoNy0/pCTR8hLwoedgCW6 zAsRscbySQeIYwi7Pr9yViwGm9006jM1u6ftPZ26PAVfZnhBSLimaLMsEtdCTbgMOd2z 3c7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=rle9NpOSEdfxZG2uFf4WrqyfvZpmswbu3FOcvgQJr+c=; b=udsiZ0aqShQOa8PeFNarlGGKw4TMzlHL2nYJ40v2oOd3L++ppU5q9lSj/S6e95kupU qN2JzxEVHkAfrfpdQJ4aEvn8MKy6Ifu0zofZSzlYaMsbMZfKDsUnCbfgB5FcX+4PnVEW kKRtw5ZccXQyq8rHJ+ST/1Iz1NSnrXnYk036xRXrz8etndp5gGz+PtQPDtM1vAAaIRSe dVKukTqRsFQVxXacUa1EE9jsJyn2hVRWtZUHSXqciHZJXUtIZnKqP9axNRSsF/sdbqdS 0aUP+qywEBrol4RtmK3BbMsZnkfDwRaBrJpamORJz5/wGniZDY/ywHlViF/epXdHz9+A fhCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gb8si1405399ejc.558.2021.05.26.20.48.36; Wed, 26 May 2021 20:49:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234205AbhE0DAy (ORCPT + 99 others); Wed, 26 May 2021 23:00:54 -0400 Received: from twspam01.aspeedtech.com ([211.20.114.71]:22846 "EHLO twspam01.aspeedtech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234169AbhE0DAy (ORCPT ); Wed, 26 May 2021 23:00:54 -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-kernel@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 >