Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp573422pxf; Wed, 7 Apr 2021 06:46:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkSDe2d4YCr1FZ5izB3sEys5g3I6AAPX271FXbuDCAm1Xks/LlBH8Xapwu4cYYc6rsakrd X-Received: by 2002:a17:907:6004:: with SMTP id fs4mr3727350ejc.479.1617803196503; Wed, 07 Apr 2021 06:46:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617803196; cv=none; d=google.com; s=arc-20160816; b=D8BfhTzBbfZJU+3spsYsblafX13eRvZvGiYPKscigbf9aFoSKfESSqOZ/nLA/cdd3T hKDuEeXKlytLnHR/9M9xkzw7VJn2lazW48NgWQC8hb8RhsmrdDNkc+54XxX1R0vYin4e /L2l9CrNIKdYjfQotIwZpMUpgc2f0NSuLIeGfFV13SwOpiAGGBHFKaS509iBr9uauqVP 2z3fSXz2JoSh8rar98KjvMn3qLPt80XtdahK3+2ZL1GcDRxAcXzQwUk4o0q0OTvefpqA 56cxiN5wuUc8+XsQq4+GjTpE5AWtaeXZvFuC8QN9PBPM6ZwdBfK31qgXJtsieU4QslgT 9rxQ== 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=6ct8aNDGj2X+XJeX7lYkZt6IPFqqbQifCGfMCC5Cmw8=; b=ujEMWT6B4Epd1TNkMN+diS+2lzjw3OaKx0knyhJSkmZEVMwp6k9ejq75PWPvDAL9Q9 S6pGT2kS/t+pEusInsNUrwyO6dXUhtVh5rSoAxHKPn1KJfUtMfssK0Z5RDdBVq7T19sn 0O/UL8z/ggBLYxFbQF7MRkztnOSWNGfDj26rBWbapxtBbCsxSQ0SD5ql3AuVdkfMy3Yw 3MeApq2/Fntl7nqL6brfr2ZDXkoZseKZTYAbf5jvhlHa1FIgKSAU+t8D7JbXZ5nLItz+ vDscr9E6aYeH9NHw1SN6XMHTuRhIIKi/irtOmSbLdOJhkwh245JQnDgWMKFdIeU7K93k rOSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FrtiQ5sD; 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 y20si523735edv.428.2021.04.07.06.46.12; Wed, 07 Apr 2021 06:46:36 -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=FrtiQ5sD; 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 S234122AbhDGBLE (ORCPT + 99 others); Tue, 6 Apr 2021 21:11:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:50998 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232109AbhDGBLE (ORCPT ); Tue, 6 Apr 2021 21:11:04 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 015A0613A0; Wed, 7 Apr 2021 01:10:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617757855; bh=ytSU4fv9jJCH9tfKggHJIkhDskeqyCMamGtUzl3Na78=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=FrtiQ5sDagQepN3AjASAwLRnw0pcyXzUfQXZTS0aAcTKjGhmpdLG1cZqCBHuILjPg 4VhEaV/GNvLGDYzcp696BXleG42oicYgbterMCOJ+DfbmR5ewI4kI/U/kObus86rJT LtIqgXlloKkvJCPthv1+Mc9WlLWcCHKVIi0vdgowQHJnXHsKSHXPVpNrXUqPsiV/b1 3HNnAz2m5sEjvIzZLf3IAKV6/5Om6Y5d5Bk4T7Xptk5Gk6+EQnmiMduQxDbuvis/FW 8GCvzZAM/1561zx+yNNgB2FRlJN1wj63+uL21TTthcRx+/+wlXVLmO7UbV71zgXlgF p8FWSMenPj7Uw== Received: by mail-ej1-f49.google.com with SMTP id qo10so14470910ejb.6; Tue, 06 Apr 2021 18:10:54 -0700 (PDT) X-Gm-Message-State: AOAM532ZZPajYbjVuYLfewUlqgOPx68XjQo80MKE3EbryKJ5EBvg+CDs a/gdBaVFxeADy6DiDIRs6jLhEqCV2wh9BYIUqA== X-Received: by 2002:a17:906:4fcd:: with SMTP id i13mr866148ejw.341.1617757853442; Tue, 06 Apr 2021 18:10:53 -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: Rob Herring Date: Tue, 6 Apr 2021 20:10:41 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] of: property: fw_devlink: do not link ".*,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 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