Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1600238pxf; Fri, 9 Apr 2021 12:30:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwS4SeilxkDpOfT/YzG77NZDEsQ4CgF1tMvqTj02K4BdqxkkidAYltg8V+WVwmcQeWXVzRw X-Received: by 2002:a05:6402:1013:: with SMTP id c19mr18990040edu.213.1617996601781; Fri, 09 Apr 2021 12:30:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617996601; cv=none; d=google.com; s=arc-20160816; b=ikgmwbik6rY6t2cCDa+sEwyFSyrK1ytBw3sPTn7Y7mC6G/F/UO36TMVZQyjRlIHQ5+ mN1K5yza698egUMZb+MMIZgNBP425jnQdItPjW91ooXOK69j5Ipv66pVVXxBYr4nSqUK /qLWrwauL9ooTb6jOm4FCqeiceKI0/3PzIujJc6/3TJRFX77ISv7Y46PYYam0ciMcXMf z9J1T7MWWY88z21BS8FgPh9quyNhKSX673E0inqE+6BXoCiKmYqE0w/L8mDaG80DtZBD XES0vX/U9i67rukbmjj1ORF/exeGAjNP3lTQmk9BkPD8M9whe61MLXPJZXFT2j7Nc1w1 6IGg== 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=rCVxLdjveRRVUr3DfzQQdHXz2bKQxAkWxMhrG/AHf4s=; b=F34rxN5oJVN2leaZW3W9Unqg+UiPp+F6duG0fXNoj5yNcduIUsWVrbfcCSs9/nKIa0 19RbEZgeU96T2VtWaltJGncfxUjCHeQHP2WAMifrDfjWiuCNFq6oi4NEckQ63OCVVOlY HglYtYeNLk+mAzH4n7e8HkCOtF+oWjYOq4n+YHjP3vLONnBEnJV8E7h+BMZrvn6HjUFX DkL3cBfxMD+ZHl703Cayz3emh1nLkmSR6fn5NOzt++8dPDU8mcsMtarmu54F7PHuW4Ej PWR3JLV3hg69Jf4QAy9V4LBl4gGJFi2Y7L2HPJS1wJoLn9zFSSUst8hUJtrILZDYcvPN ItDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KR5GLfVJ; 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 cw1si2833669edb.3.2021.04.09.12.29.38; Fri, 09 Apr 2021 12:30:01 -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=KR5GLfVJ; 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 S235030AbhDIT0w (ORCPT + 99 others); Fri, 9 Apr 2021 15:26:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:45726 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234785AbhDIT0t (ORCPT ); Fri, 9 Apr 2021 15:26:49 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 38B7461182; Fri, 9 Apr 2021 19:26:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617996396; bh=T5/Gk8/7t53pIA6HJOjBE7f7lEizFcgkfyEEm5DesGA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=KR5GLfVJttocQkbnBxLu4wlbH7p9gaNmBABUzwCQgqqIi1L12D53lHakc+Y5Hwgco SE5N2RDevq51ktjJIpefE8rHn2ARC48mTYsEP0KKpivPI+qZY4MuwYJc2nVKws1mCE 7cSkD5CjDgODNQ2L4eE2WZpUlzDKWXiR+g5g1w/DisOPwtN6RXbP6h4+lGK4JBacQT 3YOhY3Z2+dwPBO+TDEzaiQz0wuIkj0q/JMg7mHYdGlB5p6Jm8wZ9choz5HPSpRlhd+ LH5fdOyP9pmWCd+eXT37ZS8RCBRM10ZEZ4K6Z8dkkynMOpCPYJfxr+fGM/xgJqH6vb tcBbu9Gw/+VJA== Received: by mail-ej1-f53.google.com with SMTP id l4so10318457ejc.10; Fri, 09 Apr 2021 12:26:36 -0700 (PDT) X-Gm-Message-State: AOAM530TlDKK4F+yE+n24Jv+9m8nKF97wA1uLIoRB2Tjbognb0Rv7MZw EhZeGaCeGjXh5x65VYCFgf2kJGzZ+0cx7Z5Acg== X-Received: by 2002:a17:907:217b:: with SMTP id rl27mr9796319ejb.359.1617996394718; Fri, 09 Apr 2021 12:26:34 -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: Fri, 9 Apr 2021 14:26:22 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] of: property: fw_devlink: do not link ".*,nr-gpios" To: Ilya Lipnitskiy Cc: Saravana Kannan , 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 Wed, Apr 7, 2021 at 3:45 PM Ilya Lipnitskiy wrote: > > On Tue, Apr 6, 2021 at 6:24 PM Saravana Kannan wrote: > > > > 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? > Do you want me to re-spin on top of driver-core? The patch is > currently based on dt/next in robh/linux.git I did say you need to resend the patch to Greg, but since there's no movement on this and I have other things to send upstream, I've applied it. Rob