Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp686825pxf; Wed, 7 Apr 2021 09:10:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyn2mJRSGC79MKCKs9HjPrxEvMcVuv8hMEiTRhGWZbWp+4NF6TCSIXjZjivR+z+GtWs++r0 X-Received: by 2002:a05:6e02:68f:: with SMTP id o15mr3284464ils.106.1617811854771; Wed, 07 Apr 2021 09:10:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617811854; cv=none; d=google.com; s=arc-20160816; b=Y6ieatSz+BOKofjfkKBzeU/F94AAtP2+OyHJtwUSB7nTeI+vFc1Z8ioOWK4/aA0lij d0r4NcwlI0M134nS7uJwrZI/Fw9CYzKAckJN9Ea0jVQXnLHhgU7BuU+xHWvt0H0wUvWC Eih/DP2piyJTkeTwhXtwY1IRaT++qjuniPrR43KzxogLu45IKKtvOWoYVJH1F1EyDIDI zHp4Zccw9uvXQN1vl5KF+Db4VVUpleMKoKwH9opiXfTlv+rz+2Z/VR/R8aRn4FMxT9pz 4CEzMO4DrBcqaSy0VVI/iQgafNA+1H1HYQccb/Wl+smmJZ5RKt10Wqj7sey7V55X+IOF JgOQ== 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=f51iZjknc5u2AWAwTDyD4aSak7KE5kMCHStgrZoI5UA=; b=no29KM+575sKEdw8WvuShSA7mOnhCABpz1nFKUoQOAHugyVR8fvQm+5ERwA7gV22He vQ53AnMnvI2qLL7bjbe8LbliPnEYCy2B275NbKHTC1i4waan7gWXHu2rJAqBNhs2O4Ey DfhdOqWEac8oLyIL1bjL2uTmz1Xqw6grbGOxozV85rYja6aubeLxnt9zUzjjQ3ET4XC2 zUNnK1f4RHXCld3KVjRIM/vSjLCDvBdGiuHPpWl40BvCdiqgMLq+x9IYG92hLK809ixy ba1w/wm0zZoSRkcOr841tOgfR1wQcTev9S5q3lcfE09gCH5ILlQi0V1+JKrjaLlqgKrK aKAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Lb8ixtya; 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 s190si22905303ios.22.2021.04.07.09.10.39; Wed, 07 Apr 2021 09:10:54 -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=Lb8ixtya; 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 S1347701AbhDGBZI (ORCPT + 99 others); Tue, 6 Apr 2021 21:25:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347695AbhDGBZH (ORCPT ); Tue, 6 Apr 2021 21:25:07 -0400 Received: from mail-yb1-xb32.google.com (mail-yb1-xb32.google.com [IPv6:2607:f8b0:4864:20::b32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8C1AC061756 for ; Tue, 6 Apr 2021 18:24:58 -0700 (PDT) Received: by mail-yb1-xb32.google.com with SMTP id x189so18328488ybg.5 for ; Tue, 06 Apr 2021 18:24:58 -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=f51iZjknc5u2AWAwTDyD4aSak7KE5kMCHStgrZoI5UA=; b=Lb8ixtya79eOwQ/bxt7clK7iVx4183UImzCSc7Z5LI4d2dPk6R0YAlDjEhoWHVgy9o Ku6wQqKgNOB897sIWqMsYBYQkl1w2IVBf34PfW30cAi1F3LXC78/oUVw1fZIsxh5SubN Grkxz5s7Cm3C43qkMp1TmCXMzqt5x/ZpeBTtoaydSRfdYVj4G9elS/u6Bo6RQnQXr6ey 0dGH9B04ye0LOp2Tc2nN8U1HPqSLrSXBxyNbxSKZBZm+iQS/6YqG7hgVn7Cq7Hv1vlwi 2Ehv0quyoZY6qJqfumpP0UpdkTfYOl2mgDjbq/vr9PLw4JvgNxoVkmggcr9anue7Wks0 taLA== 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=f51iZjknc5u2AWAwTDyD4aSak7KE5kMCHStgrZoI5UA=; b=asY81wkg0aLUmrJf64Q1PX9EYBFiyQu3vQXOIeqjbCSkfgQ/TkvDCPm8ecU9MrzpAW FS3dE9leLchDwr72w8k0X0JX8sd7+mNh3EH64O4YXTt8h+H9TuvuZKUQHR2aJUs+iPL8 T2X/TzJv7DOorwzE6e0pLvJCDYtttbqhm1SJh29UXSHnhYckFmqz3b9cfrc5MibNTuE+ SdtKqpSYBQL5/QhGxgGjF+nr/0y0QHYWHrlATyeAdNPIhwkDAbf0JscgyK1q+wrTMxBL iaNeJutQbn8DGUaLbJI5sLH+VJlRgTTDQSqv403rU/UzUve9R7JcYmF2GxWzFoCWQC1S Oy7g== X-Gm-Message-State: AOAM530Dvfkubu3EQKNWEOEwk+J47obhT+nfECSsteXeRUqDj73T36sp /GFeUMdsrpNvNfAmUtoYkm5ms4xzOrbjtIdKBHP/7g== X-Received: by 2002:a25:907:: with SMTP id 7mr1140032ybj.346.1617758697690; Tue, 06 Apr 2021 18:24:57 -0700 (PDT) MIME-Version: 1.0 References: <20210405031436.2465475-1-ilya.lipnitskiy@gmail.com> <20210405222540.18145-1-ilya.lipnitskiy@gmail.com> <20210407003408.GA2551507@robh.at.kernel.org> In-Reply-To: From: Saravana Kannan Date: Tue, 6 Apr 2021 18:24:21 -0700 Message-ID: Subject: Re: [PATCH v2] of: property: fw_devlink: do not link ".*,nr-gpios" To: Rob Herring Cc: Ilya Lipnitskiy , Frank Rowand , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , LKML , stable , Greg Kroah-Hartman 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 6:10 PM Rob Herring wrote: > > On Tue, Apr 6, 2021 at 7:46 PM Saravana Kannan wrote: > > > > On Tue, Apr 6, 2021 at 5:34 PM Rob Herring wrote: > > > > > > On Tue, Apr 06, 2021 at 04:09:10PM -0700, Saravana Kannan wrote: > > > > On Mon, Apr 5, 2021 at 3:26 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. > > > > > > > > > > nr-gpios without the "," prefix is not allowed by the DT > > > > > spec[1], so only add exception for the ",nr-gpios" suffix and let the > > > > > error message continue being printed for non-compliant implementations. > > > > > > > > > > [0]: nr-gpios is referenced in Documentation/devicetree/bindings/gpio: > > > > > - gpio-adnp.txt > > > > > - gpio-xgene-sb.txt > > > > > - gpio-xlp.txt > > > > > - snps,dw-apb-gpio.yaml > > > > > > > > > > [1]: > > > > > Link: https://github.com/devicetree-org/dt-schema/blob/cb53a16a1eb3e2169ce170c071e47940845ec26e/schemas/gpio/gpio-consumer.yaml#L20 > > > > > > > > > > Fixes errors such as: > > > > > OF: /palmbus@300000/gpio@600: could not find phandle > > > > > > > > > > Fixes: 7f00be96f125 ("of: property: Add device link support for interrupt-parent, dmas and -gpio(s)") > > > > > Signed-off-by: Ilya Lipnitskiy > > > > > Cc: Saravana Kannan > > > > > Cc: # 5.5.x > > > > > --- > > > > > drivers/of/property.c | 11 ++++++++++- > > > > > 1 file changed, 10 insertions(+), 1 deletion(-) > > > > > > > > > > diff --git a/drivers/of/property.c b/drivers/of/property.c > > > > > index 2046ae311322..1793303e84ac 100644 > > > > > --- a/drivers/of/property.c > > > > > +++ b/drivers/of/property.c > > > > > @@ -1281,7 +1281,16 @@ DEFINE_SIMPLE_PROP(pinctrl7, "pinctrl-7", NULL) > > > > > DEFINE_SIMPLE_PROP(pinctrl8, "pinctrl-8", NULL) > > > > > DEFINE_SUFFIX_PROP(regulators, "-supply", NULL) > > > > > DEFINE_SUFFIX_PROP(gpio, "-gpio", "#gpio-cells") > > > > > -DEFINE_SUFFIX_PROP(gpios, "-gpios", "#gpio-cells") > > > > > + > > > > > +static struct device_node *parse_gpios(struct device_node *np, > > > > > + const char *prop_name, int index) > > > > > +{ > > > > > + if (!strcmp_suffix(prop_name, ",nr-gpios")) > > > > > + return NULL; > > > > > > > > Ah I somehow missed this patch. This gives a blanked exception for > > > > vendor,nr-gpios. I'd prefer explicit exceptions for all the instances > > > > of ",nr-gpios" we are grandfathering in. Any future additions should > > > > be rejected. Can we do that please? > > > > > > > > Rob, you okay with making this list more explicit? > > > > > > Not the kernel's job IMO. A schema is the right way to handle that. > > > > Ok, that's fine by me. Btw, let's land this in driver-core? I've made > > changes there and this might cause conflicts. Not sure. > > It merges with linux-next fine. You'll need to resend this to Greg if > you want to do that. > > Reviewed-by: Rob Herring Hi Greg, Can you pull this into driver-core please? I touch this file a lot and might need to do so again if any fw_devlink=on issues come up. So trying to preemptively avoid conflicts. -Saravana