Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3892809pxf; Tue, 6 Apr 2021 02:59:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkRKeEuMaNzRI2Vph5L3BRj6glZDrKV8z3D2ysuavWueVRE5/A++jdcrUr0BYmJx/FxzML X-Received: by 2002:a17:907:8315:: with SMTP id mq21mr19724196ejc.197.1617703170532; Tue, 06 Apr 2021 02:59:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617703170; cv=none; d=google.com; s=arc-20160816; b=MF1+YnsSAywJIjdw3bufh8bfZ4LxZeoZiQR3qIKVj8LX+SZ7VH3yLIarPysUuLE4UG Cg0T/onIgLE8Syz5vazzpjxGqnRlsJB12fLlgOFtcaVQk7fR8YOA8hUckRUr4KI2yQPe crQRUch2FU7IJ90nonPgitun/Voy37DT1M0WD7cLVpXnGhsjNllzK2ZniIAzE/duqrbA m4f3uLK0/59wqC/RutJglxm9OzQ1s1bDHhkYMvEVJkj9ms5CSPvJMIhx2SfT1HxQh4Tv PfNWzfq33pC15bdqE1g7gSCYan0EvKaqvKq8pnyrp46u4nrcHcS6BYRQ/X1/rIe3WNHl PiHw== 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=/pl2zZp1doMtSTurK4t2K/SYdeF+JJEMQaZ0JlLiuBg=; b=BudENkXl+dktlvbAtyb6R+HDXMQEjwtRpS4FlrztzUOcuG2QfrIrijNZOD/C7V0NEM dR3GeghNohIzqK7yPV21IAi8438sZXJzCASnO0Dha1WQ/FSN7H86zPSoDAM/mTv/6I6J qZnUS+lSD5Hn2Qb0jHMZUnV9WgTcaLFudIn6UaWO22vV/b01KxskORfVNlKy/PZTFqjQ Ab4zaovCMzOsH0Qt7gOAgxMJE2KXTQMxi26yYNNnReD9snzUhhGwv/1h+6tR6ln9neR1 dJ8CefPKRtjWTM6P23AJwgM4tu8gOs/e6qzDDjXc3V9JYLzPA2zOWUo7bG9t3vkU8x7T ODRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="D8Rf66/l"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id be12si5675394edb.159.2021.04.06.02.59.07; Tue, 06 Apr 2021 02:59:30 -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=@gmail.com header.s=20161025 header.b="D8Rf66/l"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237424AbhDEUzu (ORCPT + 99 others); Mon, 5 Apr 2021 16:55:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236040AbhDEUzs (ORCPT ); Mon, 5 Apr 2021 16:55:48 -0400 Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32D3AC061756; Mon, 5 Apr 2021 13:55:42 -0700 (PDT) Received: by mail-io1-xd2d.google.com with SMTP id x17so13279686iog.2; Mon, 05 Apr 2021 13:55:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/pl2zZp1doMtSTurK4t2K/SYdeF+JJEMQaZ0JlLiuBg=; b=D8Rf66/lLIh1WUBvCEqNjZ3WXVXn1eGogGxvnOAnYlXhqjunF39UxzMoM0WC6+V+tT tp/8cXUjWc+7kaq9qDGA7cEB1hab9WmsOMPbFeU7sG4yx4U5GyIceTg2DHZV/yORK0wX 6adZUF/tq4oqNy09B9I1QF7G6YAVnBH3onilFkf0M4NqRuJkkoa37tzjRP+lKrS128HL QMSDAJuoozMjIEloApGLSm52QfwXoqm8Pdn0+4cHK66fpjX7B0lxmYl1rYPnCsCRnsWa YTRfcZy0DmSZROzDoLPJTxZ6Oc9022Dpgo4BcFJWpM5dtOthg/dvk3zp9dYUJrfJwgLu 69zw== 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=/pl2zZp1doMtSTurK4t2K/SYdeF+JJEMQaZ0JlLiuBg=; b=pLRtb5DE39ly2F/Ak/fhSe2e/in0x09vrpOx+XUzkTMsEHHQ7F5EA2Y5yi4qYZ28ca 0UFTRqpw37Uz4tch23qF7T3YLh6fIk42yQIOhZGyh1dSTyyHYcZBCSW9nLpR34xFisoM luS+z6hlSp7IEhhb4ba3SBT19D2UKP3YYbCMbHfOS/v+J/jeTVDjOQdlQc1Uit8Ly3u9 A/RPSMA8Giw3TsHZAjkntTxUlc9YY4nzWb4obQwGXZO2KONn4YZl0iAHN/arFMJxJlOD u7jYcaG5JZ9MW9BQgZepn/nPbE1yviVLgMC20hUV8lyt1mzaLPqIj1C6UyuNE6WV6ZHT 5SVA== X-Gm-Message-State: AOAM530nSLgByRJrqSrBukG4TMOX88ku9MJFb4Wntvg3X+37XXtd2ffO TXsuyfVdQM+VLjL5ZDyepDfmVgtJBCe0hfnGUiI= X-Received: by 2002:a5d:848a:: with SMTP id t10mr21442006iom.68.1617656141715; Mon, 05 Apr 2021 13:55:41 -0700 (PDT) MIME-Version: 1.0 References: <20210405031436.2465475-1-ilya.lipnitskiy@gmail.com> In-Reply-To: From: Ilya Lipnitskiy Date: Mon, 5 Apr 2021 13:55:31 -0700 Message-ID: Subject: Re: [PATCH] of: property: do not create device links from *nr-gpios To: Saravana Kannan 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 Mon, Apr 5, 2021 at 1:19 PM 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. For the offending drivers and docs that don't have any dts/dtsi files in-tree, can we just "sed -i 's/nr-gpios/ngpios'" and call it good? > Looks like even the DT spec has an exception only for vendor,nr and not just nr. > https://github.com/devicetree-org/dt-schema/blob/master/schemas/gpio/gpio-consumer.yaml#L20 Thanks for linking the spec. I can re-spin the patch with ",nr-gpios" as the special suffix to align with the spec. Ilya