Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp591676rdd; Tue, 9 Jan 2024 13:22:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IEwSIbn75H6kzBC6YXQb2CaxGaG9nSdHXhJPwdC34P4kaC/bOs6oLBkwA0aVitiZYWn87ls X-Received: by 2002:a05:6a20:6a9c:b0:199:884b:acc3 with SMTP id bi28-20020a056a206a9c00b00199884bacc3mr2373876pzb.120.1704835334368; Tue, 09 Jan 2024 13:22:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704835334; cv=none; d=google.com; s=arc-20160816; b=MG1VrXakFsH097UG+Wb1puz+xcGW4oAMgnP3Y5R5jxuUlHZJkj27xNGBSk+R8Pg7Es AoknZiQDgU8vRBMfKXZTH06ODjrG+4rnlNHZRr6uZkI9roch0S9HBTlK5dwIJkM+CQpu VIukJEILDEAkqwbacO2iEcZ9+UXOSqBSk4jghq6v43dveF+/f9hSbf7U/Pk/qBdAhKvu +sBYUIruxwpyRy+8HflWlWx95NnNR0cHNgHbLcpY4uTzEjXMR3VARislkTS5txlkEejg NTd7rlNGFaO9PYxiHFtshkpXpD1widsdXJ35YShPM4xB6ANdDHAo3SftfId6KVH0jAJz KnIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=wvNDvvf+CkphUWP3gk0Y66evqY+8f6hFwU+kKRdhBcg=; fh=jfXnTAVVPp1ccyy6dgdzD/zbKqJR2F7Gcyzzf+rLb4k=; b=JLPWNHQgAQI0Szwbc+fSSeGNUQZavkwoZGN7XQR1NvIwj3waEOOKe7ne822dxde8fW 2ojoObjwpaypluLjS9/7Xy1EvAZGhZ+nrxdkYlxJzvFl/sxVVIPeeGLEwbphDdDKztM7 SjykOXfPMWhejc3Fwv1jbP12DZUSg+Wb48iShnnY3L5ftqw3y+VlJOeBvNXdxq4xS6gx fDw2PQZLg6w1FK/UWdV265Ugb+Ctqg9co7AeQ47vtAZLpdoSsGzZllXnoVYR+u6//Prq NHSyknCzWe4G5pEOjTNN30uH9KE1ZcE3z8pizpm0zubiI9QbBmsnV6SlBCcpF0VZLlgk y3lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NmflrM0N; spf=pass (google.com: domain of linux-kernel+bounces-21415-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21415-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id y24-20020a1709027c9800b001d4df6642f6si2147844pll.599.2024.01.09.13.22.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 13:22:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-21415-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NmflrM0N; spf=pass (google.com: domain of linux-kernel+bounces-21415-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21415-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 2FBBAB23444 for ; Tue, 9 Jan 2024 21:22:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A6E273DB8B; Tue, 9 Jan 2024 21:22:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NmflrM0N" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D65D43DB80; Tue, 9 Jan 2024 21:22:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4C8CAC433F1; Tue, 9 Jan 2024 21:22:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704835324; bh=wc05eXzLAZHA4XJcdaJKh8o0upGkPyKt64W55IJkYEA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NmflrM0NA1BFhHvPv0ppqDOdQPA8QfEw+ATTo61a0bT63CqmeIadLGseGKpiQKXUH tcm85TelA0P7Ol4NqYBMyKGaFcAM0XUpW8KBLM+wql3yBDLe+0dt3PXPITXD/o5Ciu pnG1c/RvygLr+hiWm0yeErLXGMPi+K1BPD6y/dU3P16/rFACra5A0l26vzPmHqihO0 Tds9IUu2B6lPfIUeImzGZkpMmUXRikEvXVzDPAMN/ZTXXWxgi8zjLs8L3U1ymURDuj DGPqZLtA2VBRmu5G88w689qC0VrTXRBFM418qFmwWvHaHfXZttt0kq9xZRhatqcRjS v1H/UzcdB7Dcg== Received: (nullmailer pid 3241456 invoked by uid 1000); Tue, 09 Jan 2024 21:22:02 -0000 Date: Tue, 9 Jan 2024 15:22:02 -0600 From: Rob Herring To: Bjorn Andersson Cc: Zhenhua Huang , miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, quic_tingweiz@quicinc.com Subject: Re: [PATCH] dt-bindings: mtd: Change the schema for nodename which includes "sram" Message-ID: <20240109212202.GA3236341-robh@kernel.org> References: <1704367382-29979-1-git-send-email-quic_zhenhuah@quicinc.com> <20240109184323.GA24189@hu-bjorande-lv.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240109184323.GA24189@hu-bjorande-lv.qualcomm.com> On Tue, Jan 09, 2024 at 10:43:23AM -0800, Bjorn Andersson wrote: > On Thu, Jan 04, 2024 at 07:23:02PM +0800, Zhenhua Huang wrote: > > Node name which includes "sram" not only represents MTD devices, but also > > lots of sram devices(eg, qcom,imem.yaml, rules in folder sram/*). > > > > To avoid the conflicts, change the schema as: > > - if node name includes "sram", must select "compatible" to match > > (I have listed all "comptible" string in mtd.yaml by searching > > drivers/mtd/* to find applicable drivers) > > - if node name is nand/flash, use "nodename" to select. > > > > You're right, it doesn't seem appropriate for the mtd binding to be > selected for nodes intended to match e.g. the qcom,imem binding. > > > Fixes: 7bdc671822e9 ("dt-bindings: mtd: physmap: Reuse the generic definitions") > > Signed-off-by: Zhenhua Huang > > --- > > Hello, > > > > Tested a few devicetree nodes, which confirms: > > "qcom,imem.yaml" which in sram/ not matches with mtd.yaml anymore. > > All nodes include string "sram" must have "compatible" which listed in > > mtd.yaml to be matched. > > > > Current I just modify the rule for "sram" as it is definitely conflicting with > > rules in sram/*. I have not much backgrounds on nand/flash whether they may have > > similar conflicts. > > > > Documentation/devicetree/bindings/mtd/mtd.yaml | 24 +++++++++++++++++++++--- > > 1 file changed, 21 insertions(+), 3 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml b/Documentation/devicetree/bindings/mtd/mtd.yaml > > index f322290..1704437 100644 > > --- a/Documentation/devicetree/bindings/mtd/mtd.yaml > > +++ b/Documentation/devicetree/bindings/mtd/mtd.yaml > > @@ -10,10 +10,28 @@ maintainers: > > - Miquel Raynal > > - Richard Weinberger > > > > -properties: > > - $nodename: > > The mtd binding is $ref'ed by other bindings, similar to how we do with > other bindings of common properties. > > So, I think the problem with mtd is that this ($nodename) turns into a > "select" automatically, which causes this binding to match nodes by > name, rather than just those $ref'ing it. > > > We should be able to avoid the automatically created select from the > $nodename, and rely on $ref, by just adding: > > select: false Yes. Rob