Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp197351pxj; Wed, 26 May 2021 20:25:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxwTYAHS+IQdwSm02o76xo7Z0sPeq+o+oBl8GWXgql2ySS/Wf+bQiusv1fz/Yu0kyp9Vxt X-Received: by 2002:a05:6602:184b:: with SMTP id d11mr1206125ioi.90.1622085941497; Wed, 26 May 2021 20:25:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622085941; cv=none; d=google.com; s=arc-20160816; b=yvvCZpAxTsP6CgXCIFnmhFFOj5dtjgR13Brq4QUZyacmrGWt3oSFb0x5bRN9q48Tym W8edEtL1ftnLL3MastSxnC7pzMFpAVNs2073eNMKRidtlV3iJ3mx5vQRVa3wDoroQ9Sy OKWSTrVMfhVInB3b1wPDzrjfNajb4UeqURaenTAfRCoqc/7oyb46VykTRExT6MqTkGdL XG7Dbx3YTfdYM2BMD5x9DlUGfIJ7QJh1P4ZohZ1Urz/2wiJ1PCmF04zoy8huuAJl8O8U gef106mIizpbdsD1kneFXyavdHTA6V2PstpnSTbxZkbg9HZfk53OcB17ZESa0MiXPa6W UCgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=vkDaZ4Vj8mgKwLpscJCbuhAEqTMkze3gy0+5F7ecI/I=; b=s3z3sjWYqQl6/4F5iTHfTvsaBpTzcVZuxoBw2muaw4fK4UmAZJnQ9s0Ch/AZiALyy5 NIbt1NkMA85c+O2EsKOOUDgioL+bR8gO8wy9weCQRdoLLKHr7DLFGjXHK3fJCZPfdaHn /Fd4IS4mrHCDFna3OHY3kMonuXZ4BB0qdV/oIwgtckJIWdxFbg/VcbMTCuJR2B5+ErVK 0/mEMcUH1Wl83O6bgMvMiIU4q2x/iltxOZPONlk9gMqL1269ogf+dU5EoLVCm5m/HEbR MAAeqJpP3XBI/pEcCHtSl65DnjEoFGX/x1R4UH2hVayJK8jhK/rmJO2bPL7YtogHPmTI WwMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ozlabs.org header.s=201707 header.b=K2if7ryy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ozlabs.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g8si941914ilk.127.2021.05.26.20.25.25; Wed, 26 May 2021 20:25:41 -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; dkim=pass header.i=@ozlabs.org header.s=201707 header.b=K2if7ryy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ozlabs.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233674AbhE0Boa (ORCPT + 99 others); Wed, 26 May 2021 21:44:30 -0400 Received: from bilbo.ozlabs.org ([203.11.71.1]:43707 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231968AbhE0Bo3 (ORCPT ); Wed, 26 May 2021 21:44:29 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4Fr9Yn31VKz9sPf; Thu, 27 May 2021 11:42:53 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1622079775; bh=ZS8pKZC0rALk5FKsBmqSxc/EGGyl/NL76hCAbd4pK1I=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=K2if7ryyvkECFbijqrSBC1HorlX2a4EFf0OiYKXejMep2456kRglHWDhKjLGO/Lif C0D69pDAXcdaEt0W15tWFhEwohyj+q1QzB52Y1oJEfjBgH6Cw5JZR+vBB02zOpGmzs hLU1GqUgY2+JbAIU2iqMOyQop+8Pot5pt0NmeILVzqvBrYSlj4FmV91eRWogBk6hhp ZLiVlc3drZRE0T+tXtudEINgvV1HZZwIp2Rbg4G6Ovsr5n2xmswHFxs3w2WqO6e6PT i2DAK7+fbIQxKbk/XLTL2C+uRGHUzd/9UxyqjIwWs8iaE/sf6yvqDXNimkP2hBfHXj m1FpKhii4SJQA== Message-ID: Subject: Re: [PATCH v1 1/4] dt-bindings: aspeed-sgpio: Convert txt bindings to yaml. From: Jeremy Kerr To: Steven Lee , 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 Cc: Hongweiz@ami.com, ryan_chen@aspeedtech.com, billy_tsai@aspeedtech.com Date: Thu, 27 May 2021 09:42:51 +0800 In-Reply-To: <20210526094609.14068-2-steven_lee@aspeedtech.com> References: <20210526094609.14068-1-steven_lee@aspeedtech.com> <20210526094609.14068-2-steven_lee@aspeedtech.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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. > +  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 > +    minimum: 0 > +    maximum: 128 Will this be the case for all (future) hardware? Can we leave this unbound? Cheers, Jeremy