Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1605692pxf; Fri, 9 Apr 2021 12:38:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQweW7QgF67ywOrjIUD4ZE1cWgtp8HgPu86wWTMeOOlGIV+k+ulxXfXREPRxwSkLzm9HQN X-Received: by 2002:a63:c10a:: with SMTP id w10mr14416662pgf.353.1617997136283; Fri, 09 Apr 2021 12:38:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617997136; cv=none; d=google.com; s=arc-20160816; b=UfnaKaaoKoYdkv3FOzK9Y8JVHLUByfVh+gsQ/px0JB6D3VR9nzSsJ2o0u7i9v8MyKR D8b5uFOBLjG47KWKZZwt6NcPLXTTuRAj4OaavaRQ/eSWQD9xyfBSTo1OHhiB+Zhoea/n cXcSXfobnP3xOdRaHi1sLVg4UdX6gZsnagelbAN5nRBZE6UUnKJdHRIO09gGJJJR7NXP 1aSTVyPwsowkP1l5ukavminOXtRSITznIE0rzhftmBQkahswMgWJH9dzmMrGNRvE2BJ/ yqU9XdTuG2ral61vT79agPMuEuxL0kAsI8/sfstpqlTBN7cwyzKeQRxfH8Yub7KqviT9 Pw8A== 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=R1/OVPtN1o6F7NiHy85jZm12iAQXmTjdYOcMRG5H5z8=; b=zKVbYZTPaVwoO1tgMN8ksfgMRJLiPsMsrnIwVxhF2oZ+T47SiinSV/7RGKsOsc0rk9 7xjQbpjFDwC4yOUkSiW6G4AK0LtY4/EsT3IVCgu5exkuYCgIYWXZ5DVlTJ9GO1RhHV/E VQnu1xy1NFEzLUUzNZ1/6WRIs/sFEp3L3zTRUI67q9gBbPkQfs42YMNywz3PtYfDo361 BSfYC0rC2LRg55jeZD7cloRYIEkpZtz9e6PsMrZehbKoKLwlDP8KFcJzHJO6vEOnWj80 a6MWcoTx5Nggl9042ynzbEDTmwckIsAROHFzW0h5auSsrLsLr57mJsBGhdhzmMBVcUSs aGYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=H9Jv6ncb; 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 hi10si4092964pjb.40.2021.04.09.12.38.42; Fri, 09 Apr 2021 12:38:56 -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=H9Jv6ncb; 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 S234507AbhDITh1 (ORCPT + 99 others); Fri, 9 Apr 2021 15:37:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234705AbhDITh1 (ORCPT ); Fri, 9 Apr 2021 15:37:27 -0400 Received: from mail-yb1-xb35.google.com (mail-yb1-xb35.google.com [IPv6:2607:f8b0:4864:20::b35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FBC1C061763 for ; Fri, 9 Apr 2021 12:37:13 -0700 (PDT) Received: by mail-yb1-xb35.google.com with SMTP id x189so7818584ybg.5 for ; Fri, 09 Apr 2021 12:37:13 -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=R1/OVPtN1o6F7NiHy85jZm12iAQXmTjdYOcMRG5H5z8=; b=H9Jv6ncbEXaM6/C7+ee9aKWZSK/+1IvwExFPRwoyOqN6ZW1XyFCFNQpEyuBdnnOj9H CEldmayQUFpeaVZJvxt1TmodyDhik/6mPTm4+4vTrRmXD0rpEolOpGbrleZWbLXd17TR pHrOD7Cl+RI2efjYt99WdKQMPC/wdzbMi7eXq6kaGzMQpDTLwSGDCZp3MBajQqUD9bQV mxk3MtxXvJBVpuwfLtM4BMt89sZdF6VcJ//3oZ+HNUNQ0VSoI+eRHiiLPvIROwSkUb1l FRtqGvNbfhaOANAwPXq6zka4WZ7fRmfqZnSY11SRKP7zrLbMUnumUBLEUzMePjyQvt1l O1og== 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=R1/OVPtN1o6F7NiHy85jZm12iAQXmTjdYOcMRG5H5z8=; b=tgfxy4dTrHGGvZ7VyBdcHvez3NmiThT4AgBZa2XOEoo0dcxwZnpKsHsm5Jifv6G7eR jDxMOF2/PTmsD7C+5xQiYqVmBPdquC4rxM2ODn+OgPB+MQj527yrfE0JUhvxrpIbQgD/ DVjdbRZydvCx6CXe7TORm2EC6ZfCfrJLsBBMqyxBV6BpVe/iAbgE4Zw691YoVodGlmUC SqnbhEmfB1eWtus1BHNuH4/7Po5NOnCnIDxhytv/xjSW0OZNCX62oOEz8CC+h2aum/xd VFRIOA5OSf+6aMtjSNJdi1nf58A7Tu8nuW3TIW6BSKjgBXKPAsX9F6OdJcj0NU01jFce Iezw== X-Gm-Message-State: AOAM530fYo+zhejhi+mjc3wptCJaiepogT2Sv8DKYMCm6UpQAGlz8Yvp 5harg79/fCfOWzwaB8mNe1bC29D7gr/p3I9fvjzO2Q== X-Received: by 2002:a25:907:: with SMTP id 7mr20270089ybj.346.1617997032220; Fri, 09 Apr 2021 12:37:12 -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: Fri, 9 Apr 2021 12:36:36 -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 Fri, Apr 9, 2021 at 12:26 PM Rob Herring wrote: > > 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. :'( If it's not too late, can we please drop it? I'm sure Greg would be okay with picking this up. -Saravana