Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp1289436rdb; Fri, 19 Jan 2024 14:34:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IH3aAeJds34x/CX6wRRuZ/u855fR0D5WTxP5TLrkF98HVewxGSYZQp0kICGt6YH4X+biWPE X-Received: by 2002:a17:903:248:b0:1d4:e0e:fa1b with SMTP id j8-20020a170903024800b001d40e0efa1bmr750299plh.57.1705703654325; Fri, 19 Jan 2024 14:34:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705703654; cv=pass; d=google.com; s=arc-20160816; b=Oi2HBynlOBfu4sH6zfXW3GVAlV/ciFafKzEb65bbEsYPi5STsVcQ8k1uA32NCZQaMW Io3+JRipjavp8SkGqzv+ChWz7GrPOT+uFHkvVnV1kmJ48O36lopPB5b+TFVBYCzymdnd R5zDhwE2bMFT52PnRCfG/+S6xbthnZmY5BxCxeNWg1ISSWXQC9joj8qsHoZcgltcHh8k LvXAplthN8pbXtRgoW49CeA1hdIc3kyO47y8ChJIfteDT6jT7Sf9WUXvqGhNB099t00K GbmGRExQdNt5h8FM0/t4oVM7oFEdEfTEh/pk3SbhPBEt6pfkvk62zJZ/fIEy/YQ/YVLn bmRg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ku3iqWtL+Z90gkSLK2vskY8QdWJZr+xGBIAhT58Vqpo=; fh=+cRXeTNcOM8pjm49fsPOBhgkC7w9LL/M2Z0kBbnpXO0=; b=RyjRbDg80sjnRB6hQVypmHdSlRWpfWRejkgkgBmg1Kv4qgsyhwtwlTBYv7rC7W8NYd 7Tko7wx6zI/5J74G/ZkUCC4kp0XZqWdNEfu+hHqb4oGEJVe+QoOq6pQM1fKa4FH6nPnG t/j+/eMJ7UjG6W5AEgipjJ1GDToR6nr2Dl3G2POLtdu4V5up9UoQ5h1dIj581oTXiOE6 eqy74gJZWSEiKBxRbTETQwpNpnuK23rSpXHNBEMFxyw9TBjKPsxI/4zL9EfeLxkzAFtm aIHjeUvmALDhjFV9CK7+DD86QByMY+7EKWxAHHwdwVy1ThAH0ROFfW5re5g+8uJ9GJaZ kyMA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="L/ux92AC"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-31607-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31607-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. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id b1-20020a170902bd4100b001cf68d533fasi3895742plx.633.2024.01.19.14.34.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 14:34:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31607-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="L/ux92AC"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-31607-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31607-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 9135BB231C8 for ; Fri, 19 Jan 2024 22:34:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DA2FA56748; Fri, 19 Jan 2024 22:33:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="L/ux92AC" 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 063271DDD7; Fri, 19 Jan 2024 22:33:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705703639; cv=none; b=ZibZr1hf2GxigEhj+OGPydyKIBGFzutxufzQHSV8vOyO59U5avio92U+LufHPcwl/f8ep4Dc/cywEeYGBaCjDQ8mMAxyL8X4//FdQIoGYe/6F61NnPF40A9J2O3Epi9A4+fSF0sRx6gPO8DdcAAyXSnKrehzaLNTi2SGNyPGdrQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705703639; c=relaxed/simple; bh=ngixGCop/FGHGM4VzT1CdOop6LC5rXZwbYzCfDoGwts=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Go6s0vxAvfXTN7tX2yV8LZsKPgmYkqMOZs1Xo8nzRRoz4lI7vWipyyERQLD2Kn5eydAq8tnYniZO4WpIo8hkwBqsg9vrRUXVguuUnpIJ6Rb8wRHyp05jZL2baHylO1gvsDaGRofSsuHLB8IHOPxH1Fn7CuA97Fd32JH2y7d5wf8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=L/ux92AC; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31C57C433C7; Fri, 19 Jan 2024 22:33:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705703638; bh=ngixGCop/FGHGM4VzT1CdOop6LC5rXZwbYzCfDoGwts=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=L/ux92ACavMeQTuySYHzUdjzBdTshNCu8men0WVqNM8xU8CzmL8Haom99430LD/yO jVeoVk+JB5RCGBz4asKTRhVO8A+lWq+kn9iVY5t+UUzwhpED/gZacqIcfDyTUhbz+P 4jWFKEhFOEhOIFIbzsObO6/AIZ2d06gJKeuIF7VALZQQPLwB4VYlVCvRS3gmnn4MEu 9do9ADGapuKlJfF83YmsujncFeCXK+tWLfSKM8iC0j7tPKWl1kIK0rOPS0wysyeegx F4vnMaCTeympnvCFKjdCLeTZJCagf0NLgj/9AszYLWZlsXuuzSXjGuEoHYiloWsdtz hareX2ZIrt4Fg== Date: Fri, 19 Jan 2024 16:33:56 -0600 From: Rob Herring To: =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= Cc: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Krzysztof Kozlowski , Conor Dooley , Ansuel Smith , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?B?UmFmYcWCIE1pxYJlY2tp?= Subject: Re: [PATCH] dt-bindings: mtd: partitions: make partition an NVMEM provider Message-ID: <20240119223356.GA1179470-robh@kernel.org> References: <20240111121940.15628-1-zajec5@gmail.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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240111121940.15628-1-zajec5@gmail.com> On Thu, Jan 11, 2024 at 01:19:40PM +0100, Rafał Miłecki wrote: > From: Rafał Miłecki > > MTD partition provides flash device data and can be used as NVMEM > device. I don't follow what is the relationship between this and your other series. > > Signed-off-by: Rafał Miłecki > --- > .../bindings/mtd/partitions/partition.yaml | 16 +++++++++------- > 1 file changed, 9 insertions(+), 7 deletions(-) > > diff --git a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml > index 1ebe9e2347ea..7b1d84ce5ef5 100644 > --- a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml > +++ b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml > @@ -57,13 +57,15 @@ properties: > user space from > type: boolean > > -if: > - not: > - required: [ reg ] > -then: > - properties: > - $nodename: > - pattern: '^partition-.*$' > +allOf: > + - $ref: /schemas/nvmem/nvmem.yaml Only some partitions are nvmem nodes, so we shouldn't always include it. Then we can't exclude nvmem properties from partition nodes which aren't. We should identify those nodes by compatible and their schema should reference partition.yaml and nvmem.yaml. There's a general problem with the partition related schemas that undefined properties are not caught. This is partly because partition nodes can be nested and expressing that with the schema is hard. Rob