devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Ansuel Smith <ansuelsmth@gmail.com>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>,
	Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	linux-mtd@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC RFT PATCH v2 1/2] dt-bindings: mtd: partitions: Document new partition-dynamic nodes
Date: Tue, 22 Feb 2022 12:18:56 -0600	[thread overview]
Message-ID: <YhUpEOgMBX4iL2CB@robh.at.kernel.org> (raw)
In-Reply-To: <20220220173905.14165-2-ansuelsmth@gmail.com>

On Sun, Feb 20, 2022 at 06:39:04PM +0100, Ansuel Smith wrote:
> Document new partition-dynamic nodes used to provide an OF node for
> partition registred at runtime by parsers. This is required for nvmem
> system to declare and detect nvmem-cells.
> 
> With these special partitions, only the label is required as the parser
> will provide reg and offset of the mtd. NVMEM will use the data from the
> parser and provide the NVMEM cells declared in the DTS, "connecting" the
> dynamic partition with a static declaration of cells in them.
> 
> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> ---
>  .../mtd/partitions/partition-dynamic.yaml     | 54 +++++++++++++++++++
>  1 file changed, 54 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/mtd/partitions/partition-dynamic.yaml
> 
> diff --git a/Documentation/devicetree/bindings/mtd/partitions/partition-dynamic.yaml b/Documentation/devicetree/bindings/mtd/partitions/partition-dynamic.yaml
> new file mode 100644
> index 000000000000..945128e754ac
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mtd/partitions/partition-dynamic.yaml
> @@ -0,0 +1,54 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mtd/partitions/partition-dynamic.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Dynamic Partition
> +
> +description: |
> +  This binding describes a single flash partition that is dynamically allocated
> +  by a dedicated parser that is not a fixed-partition parser. To declare a
> +  partition the label is required. This can be used to give a dynamic partition
> +  an OF node so that subsystems like NVMEM can work and provide NVMEM Cells to

'subsystems like NVMEM' is a Linux detail that shouldn't be in bindings.

> +  the system. An example is declaring the partition label and all the NVMEM
> +  cells in it. The parser will detect the correct reg and offset and the NVMEM
> +  will register the cells in it based on the data extracted by the parser.
> +
> +maintainers:
> +  - Ansuel Smith <ansuelsmth@gmail.com>
> +
> +properties:
> +  label:
> +    description: The label / name for the partition assigned by the parser at
> +      runtime. This is needed for sybsystem like NVMEM to define cells and
> +      register with this OF node.

'label' is generally for human consumption and should be opaque to the 
OS (or at least the kernel). Perhaps node name should be used like 
Rafał is doing for nvmem[1]. That appears to be the same problem at the 
next level down.

Rob

[1] https://lore.kernel.org/all/20220218070729.3256-1-zajec5@gmail.com/

  parent reply	other threads:[~2022-02-22 18:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-20 17:39 [RFC RFT PATCH v2 0/2] Add nvmem support for dynamic partitions Ansuel Smith
2022-02-20 17:39 ` [RFC RFT PATCH v2 1/2] dt-bindings: mtd: partitions: Document new partition-dynamic nodes Ansuel Smith
2022-02-21  2:36   ` Rob Herring
2022-02-21 15:57     ` Ansuel Smith
2022-02-22 18:01       ` Rob Herring
2022-02-22 18:09         ` Ansuel Smith
2022-02-22 18:18   ` Rob Herring [this message]
2022-02-22 18:24     ` Ansuel Smith
2022-02-20 17:39 ` [RFC RFT PATCH v2 2/2] mtd: core: introduce of support for dynamic partitions Ansuel Smith
2022-02-24 15:23   ` [mtd] 8d892a300a: BUG:kernel_NULL_pointer_dereference,address kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YhUpEOgMBX4iL2CB@robh.at.kernel.org \
    --to=robh@kernel.org \
    --cc=ansuelsmth@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).