From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ilya Lipnitskiy Subject: [PATCH 1/4] checks: tigthen up nr-gpios prop exception Date: Mon, 3 May 2021 20:59:41 -0700 Message-ID: <20210504035944.8453-2-ilya.lipnitskiy@gmail.com> References: <20210504035944.8453-1-ilya.lipnitskiy@gmail.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=48r1+qqnn3DaNYJawDl127imPYfbuEk13sFwTYMmTx4=; b=XbkMBWWzzeXvZLRLkyiWD/soNZvaqwfY1CaEDaCP1U/55Eqe2I8ECN9r210xsbO88z jOYZJfGsDOFX4pJf9IWhHGcyKaYhpQ+jfW15XaHpjk6o2alfatC/J4nyB0gCcipwc5cT 1/GRN6cov7Mk9iB/8MLvOi5SQpSmAxwZz+AE6J3QRQTrNLnD02pkj2XgWSJyHyPLff6C aswlAGEG+VpXkiPMpUY4SgTDgWFsTUaHC8og2pD7XFwnRA6sXKvJga/J8iliEPevj3m9 W21vvf9cX8kVo6hU2NleNfq9E40rgRhxqB2PJJPL0VdAASknnScAE07Z9Lef9lXJytoz YsaQ== In-Reply-To: <20210504035944.8453-1-ilya.lipnitskiy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> List-ID: Content-Type: text/plain; charset="us-ascii" To: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, David Gibson , Jon Loeliger , Rob Herring Cc: Ilya Lipnitskiy There are no instances of nr-gpio in the Linux kernel tree, only "[,]nr-gpios", so make the check stricter. nr-gpios without a "vendor," prefix is also invalid, according to the DT spec[0], and there are no DT files in the Linux kernel tree with non-vendor nr-gpios. There are some drivers, but they are not DT spec compliant, so don't suppress the check for them. [0]: Link: https://github.com/devicetree-org/dt-schema/blob/cb53a16a1eb3e2169ce170c071e47940845ec26e/schemas/gpio/gpio-consumer.yaml#L20 Signed-off-by: Ilya Lipnitskiy Cc: Rob Herring --- checks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/checks.c b/checks.c index c4207720ce8c..7e9d73af02a3 100644 --- a/checks.c +++ b/checks.c @@ -1494,7 +1494,7 @@ static bool prop_is_gpio(struct property *prop) * *-gpios and *-gpio can appear in property names, * so skip over any false matches (only one known ATM) */ - if (strstr(prop->name, "nr-gpio")) + if (strstr(prop->name, ",nr-gpios")) return false; str = strrchr(prop->name, '-'); -- 2.31.1