Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp261712pxb; Sat, 10 Apr 2021 01:57:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwchPba4e8WCkRBwuPxpXbCmb9I0GixNLbB9/7t8BA2fQ6Tyvg9LJvW4FbI3RhpmHLYIr2j X-Received: by 2002:a63:925a:: with SMTP id s26mr16157950pgn.216.1618045043469; Sat, 10 Apr 2021 01:57:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618045043; cv=none; d=google.com; s=arc-20160816; b=tKqCxfoHzP++pO2HOOPjnnJGhudw9FmnkErLcgA+0QWljrBlwD4c2TQ5lB4wDkkxoX swxp4LGwywhu2QrZPLoNVhDeNMG4UTIrEmtgSgnFepkRxo73doGhfM6ngvJn4kXt5gBb mRi1yExeLn00Q93O3OQvy1QfWUoMafvLIUZyjYuFAsEIRNksNjnpx4aCuLqCsOHJ6lB7 eeHBYsOj34oH6apQ0k/J/JB2a6TlUFlTuZ/bqbc0En3H9kRBQ6TO8lDFxB3uQ2PYPEdG KXdhzP+IbkXqOQYUqxORaCn+NH17+Z9CVb7WdgGqf9ePdSqGYh3eO7L+HH+gBxrWroNw l4zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=aVIHFF6ucZZz+9sLJvUBGxb4wtf3EdQHVt3j+91nC5Y=; b=bZLrGSiXsts1qBq/gKpYJkcW3a619CUhI/bY5h1u5FkkKu+FREwmeNa+iAQmhBsNdK XSwc9uZhfohQzDSJ/oxJW8DYUN04KMztdboyJL4NyUxtIN1vF/X74JXBVhTjvmKoA8le Cik9tNQPV5TsAm0r0Rn1LXbaoAI7ysK2zqik6iw6AWoW5ZncoR8MsUPZNuhe+r9ISbqC eepoUuGdnj9eUpKkCPFgYZaveD9a+xL2RnqJAXGFyWY2K62xyI+xskCV0Ze7MnCdn1pR lCQkul052p4CfHt65L2HzOgsYvKClYZSTyciUn9IrT5vPELfjfeNgtTKVt9mbYzBsJ8y zDww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oSpM29hA; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a67si5691146pgc.147.2021.04.10.01.57.11; Sat, 10 Apr 2021 01:57:23 -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=@linuxfoundation.org header.s=korg header.b=oSpM29hA; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231279AbhDJI4x (ORCPT + 99 others); Sat, 10 Apr 2021 04:56:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:60964 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229591AbhDJI4x (ORCPT ); Sat, 10 Apr 2021 04:56:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2385F610CB; Sat, 10 Apr 2021 08:56:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618044998; bh=uh476dzlm2ZLs/3KLJeBiudSJ+eOoSJUDrPdW896eBQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oSpM29hARBYcly2jIPOx3Wi0tvsmDxTsAuiepulAY/nmjcGb9VHKFiWTkYzuGnsWW wFh3yXpdpeanQBcFTZVT9mv3HtLEzo+8p4rsnwVUDwC/rfykFoENE9ILXHpAVZZFto Ym2VMs6e/feghkniisPpbh9arW9H4a9Eh7mR01OA= Date: Sat, 10 Apr 2021 10:56:36 +0200 From: Greg Kroah-Hartman To: Saravana Kannan Cc: Rob Herring , Ilya Lipnitskiy , Frank Rowand , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , LKML , stable Subject: Re: [PATCH v2] of: property: fw_devlink: do not link ".*,nr-gpios" Message-ID: References: <20210405031436.2465475-1-ilya.lipnitskiy@gmail.com> <20210405222540.18145-1-ilya.lipnitskiy@gmail.com> <20210407003408.GA2551507@robh.at.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 06, 2021 at 06:24:21PM -0700, 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? 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. Pull what? I'm totally lost in this thread, sorry... If you need me to apply something, you at least need to cc: me on it :) thanks, gre gk-h