Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp541464pxf; Wed, 7 Apr 2021 06:04:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy61oEEGXHOwQ1xESF/jjZCTOON4csJExFX1oifv6WFhuj59LLQjL1lADSMcsON3NsGOAiD X-Received: by 2002:a17:907:94cc:: with SMTP id dn12mr3611305ejc.177.1617800649159; Wed, 07 Apr 2021 06:04:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617800649; cv=none; d=google.com; s=arc-20160816; b=BrCzk3Cx0XSvndiBgQvtq56XgJd6HAKx6j9PJClG+I6US3Ek3e+54mMrr5Ih2yD0SL RKQRrtTs7Y8KkybFMDU2fDLEDHfTY5Kve6LDGojBGjSeQauhRB+AOdGhE6CEqwi9zVdw HmXWPWAaDfZcJg23tYOqZcu608XHPVWC827ljcYbjJpDDudRYGvRZUwzTkRpltwFSmnh PE+LUVuaNnhveL8wiAmX4lvfG3/56elNyxeL0azRC6Zl9QPVCcAKew6it6dLX4WXVAqL pCm5unijt45YMPPxe2qh8BSACyym5OQJbGbDkWPNpz54oMUTkEh2/co9u0HBwmxxFImf V1EA== 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=eRMoe/YgEPTSiX+gZtg3ZTJaDtwdttX1NZsHhehUqKw=; b=yjkBIfJCOoB0ADwNyL2iT6xtdmjKe26mM7WtH7NdxrJVgQyVocfU3EfutVIs7Qp1/X w16aHeGQWOSJbKBgAPRhM6/egVs5ONX0pJQ4TQg1UyuuvAJ46BaxqTBJGl3xIicSu4xo Gbc+XLIqFurqj73B2Fai4PZlEFxxbusjEIZZmw5sfErt0+/4f7WE6uquV4NwmFFRLOq8 xIJU7TkkSSCLhJVesu2/g2SDZyhGsX0vBTb56tqhpsQLSUjXeNx2pDjm0X+wTmFFGRFs auI4oI7w0QZaBcNFIl0ik2gLj718AGFaFsatc6WgntzpdJBJvP4DXSPVzJixRhwbmTWU q6sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=u7r8b316; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e24si5358432ejr.411.2021.04.07.06.03.43; Wed, 07 Apr 2021 06:04:09 -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=@kernel.org header.s=k20201202 header.b=u7r8b316; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236167AbhDFWcR (ORCPT + 99 others); Tue, 6 Apr 2021 18:32:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:55076 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230160AbhDFWcR (ORCPT ); Tue, 6 Apr 2021 18:32:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D702061284; Tue, 6 Apr 2021 22:32:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617748328; bh=eRMoe/YgEPTSiX+gZtg3ZTJaDtwdttX1NZsHhehUqKw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=u7r8b316Z51vN/ImKoUHJZJIZ+RSuTHqPcc3w6453rqoHkQvV2Pti98F0YCIUbt+D cEw//YckhzHJkq60bnWlaPvf5ws0Ry05lvivSPFvrifoclIQq0vxRrKIykHG+Lbs6t 0V5pNAHbrt9InUBwI29WZ9tTgrz7QAE0qYRlk6UG9JKfXvGUeBXQf+18DyyCe4QaOb 6dx0P27WoMOP9aUMMsfS0iJtVL0V4+FJXAh5BtHhHg1foz+YzhHajd6umTjKHrOhR0 9RFJb+zX2iRNsDwbYKX2TSgSMC8uLzCVd6iYAgh7+nkmwPaj/1QpTTswfLOY+hT/0e jX/OzC6sJik6g== Received: by mail-ed1-f50.google.com with SMTP id ba6so10901639edb.1; Tue, 06 Apr 2021 15:32:07 -0700 (PDT) X-Gm-Message-State: AOAM532fvjfdupny6WXskzXc+h2qEmRyo8H+mnEU2K86tBllBi7OwTQK pLKLMy38CJe1XY9YPR953+1FrQXAlVzwEshzXw== X-Received: by 2002:a05:6402:5252:: with SMTP id t18mr736852edd.258.1617748326514; Tue, 06 Apr 2021 15:32:06 -0700 (PDT) MIME-Version: 1.0 References: <20210405031436.2465475-1-ilya.lipnitskiy@gmail.com> <20210406174050.GA1963300@robh.at.kernel.org> In-Reply-To: From: Rob Herring Date: Tue, 6 Apr 2021 17:31:54 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] of: property: do not create device links from *nr-gpios To: Saravana Kannan Cc: Ilya Lipnitskiy , 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 4:28 PM Saravana Kannan wrote: > > 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). Yes, but (3) is not gated on (1) and (2). I'm applying v2. Rob