Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp653036pxf; Wed, 7 Apr 2021 08:28:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpXj//dR68f5Op4QEMuhfxJaEoTuZYdWt5Xg6Cawr8dKcfsS9cozEriawp4kKTCoelJM/m X-Received: by 2002:a05:6402:6ca:: with SMTP id n10mr5160783edy.312.1617809297224; Wed, 07 Apr 2021 08:28:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617809297; cv=none; d=google.com; s=arc-20160816; b=ftnCo7PVYh3GxH8q5dQc93Nz309LY+3jyMKjjlmeuCn7EqvqYNVixkurc+pCG1qaIQ WYP2Yaj3rDe/kKfyaa+tiVCEtngwWOdP+rJDe/vCKEi2070JokL98mSlyIwUOd9lVyFK An106386ActRNGU6DVz6jByRmtJ6knaXKdFpYjyxTu0NKFKDobYGFCk99/Y/CISMd5PR d3dUNfmkq164x1V8vtTXd334C6WJqSVb9ze5HIFm02ZKOn1gNC6OvDO/c6nRLxEH6QGE FtxJ827NK0A1IALK3nil0ejrItAZhFiiOM7xQGHOowk2BYdL4nzE47/aE+5AX9YwnKkO D5ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=93yVXSM6Z8yACC6T5NYCS2RKgdWKzz8qPTNXWqHtpis=; b=Nla5/S7OjNPNstU4sakBrzgsQReNlcRc6v3xP0KDVYGJLhK8M7hSGf3sU6D5ppq8nv Qox+BL8x/DkQZEG0WDUGH8ziScHT/f43TsA5U9RxxOxzbmdD2E0EzBeRBDAuim1Ht6Ix c+frs50z7vkWH4WheZ5TbRJHOQju11hWw1jUMYk0dnppM8JFHVKfxRJxFFou0mE79A7O L6zs+aGdOvHC2UekjZNmvc2QgyJdyzy+BbYSa/pfrXRjF9FzoFDNMm81/6HATzlsImAC OryMw2kjXwbPeFh8ON65R1wdMrYqfdAeR9SCnY0mRUPuL32vE8enZgpk737waXi0N225 nDjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=YJeomDOZ; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k2si18817868ejx.546.2021.04.07.08.27.53; Wed, 07 Apr 2021 08:28:17 -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=@google.com header.s=20161025 header.b=YJeomDOZ; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231195AbhDFV2r (ORCPT + 99 others); Tue, 6 Apr 2021 17:28:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231138AbhDFV2q (ORCPT ); Tue, 6 Apr 2021 17:28:46 -0400 Received: from mail-yb1-xb33.google.com (mail-yb1-xb33.google.com [IPv6:2607:f8b0:4864:20::b33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54A1EC061756 for ; Tue, 6 Apr 2021 14:28:38 -0700 (PDT) Received: by mail-yb1-xb33.google.com with SMTP id z1so17794532ybf.6 for ; Tue, 06 Apr 2021 14:28:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=93yVXSM6Z8yACC6T5NYCS2RKgdWKzz8qPTNXWqHtpis=; b=YJeomDOZXDxp8j+Kg88CuTUoLUzWCMtguBHYlxo/4yvoAWRe0nvIbWZ1f45dSXHasa CE6J1dl0gomfw+UqxQiSCq5pepoLVHX+BneNbu9XLH4XKht9XsNvvbCYHSMA4bhOnQwp My+Rx4A0LBFGxUKMj50Dv06q30I3w5BMHBzGOQS/p7mZkt6Mh0yM7zIGwCnf3c9if9gd Ud5gKCokCSpAhHKYtyEoeqgcbU0yon7dHi6YlcPaGNiE5jhckFUfb81SitDOEIFQQhqa cumXaER0gopeJ5RWMvuxnaORpm7WXMP3bNfiMTChlgj8YhnHKjox+WhKW+n/q3E9uSge DsKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=93yVXSM6Z8yACC6T5NYCS2RKgdWKzz8qPTNXWqHtpis=; b=dkOL91HFilNPhvEElQ9fKCBNt/TUPtXBnfIgPry2Mh/fGLssEZFGJMu7AEIuGxI/UI r1OxkRefO8KwLFC/90gKsJjyCtnC+zjKWHlYJQ+9virMB9rTYE439SrMYD0jX/jnLAKH MeS7tjVvqkvFAjydOKcrDnXOhG7c6dBn74mAuY8MViFyHF1+xkd9vndndcRYBwe6bby4 OXZ1vrSH4QNV81PdALOEap8vDIRgAwJcG8hK02tlwl42lonOlEX27yoUT4FQgLrq2GNc mFaV3JpGl7TAUN8Zh9UQqjOHIdH4aNwx0g7zBGX7o9DFazFRUEEsZ6rbejwFumCOyoa0 7U4Q== X-Gm-Message-State: AOAM531ZKFFgvC+ZgsSe8NCynKh7sJxsVVaCUAfyXv7KQxC9wnZqOr5y +b5mkq+iC153OsCbzISFtURLsGi/mRT3vBLaX89s1g== X-Received: by 2002:a25:c985:: with SMTP id z127mr187370ybf.20.1617744516682; Tue, 06 Apr 2021 14:28:36 -0700 (PDT) MIME-Version: 1.0 References: <20210405031436.2465475-1-ilya.lipnitskiy@gmail.com> <20210406174050.GA1963300@robh.at.kernel.org> In-Reply-To: From: Saravana Kannan Date: Tue, 6 Apr 2021 14:28:00 -0700 Message-ID: Subject: Re: [PATCH] of: property: do not create device links from *nr-gpios To: Ilya Lipnitskiy Cc: Rob Herring , Frank Rowand , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , LKML , stable Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 6, 2021 at 12:28 PM Ilya Lipnitskiy wrote: > > On Tue, Apr 6, 2021 at 10:40 AM Rob Herring wrote: > > > > On Mon, Apr 05, 2021 at 01:18:56PM -0700, Saravana Kannan wrote: > > > On Mon, Apr 5, 2021 at 1:10 PM Ilya Lipnitskiy > > > wrote: > > > > > > > > Hi Saravana, > > > > > > > > On Mon, Apr 5, 2021 at 1:01 PM Saravana Kannan wrote: > > > > > > > > > > On Sun, Apr 4, 2021 at 8:14 PM Ilya Lipnitskiy > > > > > wrote: > > > > > > > > > > > > [,]nr-gpios property is used by some GPIO drivers[0] to indicate > > > > > > the number of GPIOs present on a system, not define a GPIO. nr-gpios is > > > > > > not configured by #gpio-cells and can't be parsed along with other > > > > > > "*-gpios" properties. > > > > > > > > > > > > scripts/dtc/checks.c also has a special case for nr-gpio{s}. However, > > > > > > nr-gpio is not really special, so we only need to fix nr-gpios suffix > > > > > > here. > > > > > > > > > > The only example of this that I see is "snps,nr-gpios". > > > > arch/arm64/boot/dts/apm/apm-shadowcat.dtsi uses "apm,nr-gpios", with > > > > parsing code in drivers/gpio/gpio-xgene-sb.c. There is also code in > > > > drivers/gpio/gpio-adnp.c and drivers/gpio/gpio-mockup.c using > > > > "nr-gpios" without any vendor prefix. > > > > > > Ah ok. I just grepped the DT files. I'm not sure what Rob's position > > > is on supporting DT files not in upstream. Thanks for the > > > clarification. > > > > If it's something we had documented, then we have to support it > Do I read this correctly as a sort-of Ack of my proposed [PATCH v2] in > this thread, since it aligns the code with the published DT schema? He's talking about the DT binding documentation in the kernel. I interpret Rob's reply as, you can do all of this: 1. Just fix up all drivers that use "*nr-gpios" that don't have binding documentation in the kernel. Change them to use ngpios. 2. Try to switch away old defunct ARM server DTs from nr-gpios to ngpios (both drivers and DT) and see if people notice. 3. Change the fw_devlink parsing code to have exceptions only for cases that are using nr-gpios after (1) and (2). -Saravana