From: "Rafał Miłecki" <zajec5@gmail.com> To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, Rob Herring <robh+dt@kernel.org>, Miquel Raynal <miquel.raynal@bootlin.com>, Richard Weinberger <richard@nod.at>, Vignesh Raghavendra <vigneshr@ti.com> Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, "Rafał Miłecki" <rafal@milecki.pl> Subject: [PATCH 1/3] mtd: core: call devm_of_platform_populate() for MTD devices Date: Wed, 22 Dec 2021 20:23:18 +0100 [thread overview] Message-ID: <20211222192320.21974-1-zajec5@gmail.com> (raw) From: Rafał Miłecki <rafal@milecki.pl> This adds support for bindings present in MTD devices (applies to partitions too) nodes. The purpose of this change is to allow drivers handle MTD device (partition) data. Some partitions may contain info that requires parsing & processing. An example can be U-Boot partition that contains block with environment variables somehwere in a middle. That block should be described in DT and parsed by a specific driver. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> --- drivers/mtd/mtdcore.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index 70f492dce158..07b75e6ca111 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c @@ -19,6 +19,7 @@ #include <linux/ioctl.h> #include <linux/init.h> #include <linux/of.h> +#include <linux/of_platform.h> #include <linux/proc_fs.h> #include <linux/idr.h> #include <linux/backing-dev.h> @@ -690,6 +691,9 @@ int add_mtd_device(struct mtd_info *mtd) not->add(mtd); mutex_unlock(&mtd_table_mutex); + + devm_of_platform_populate(&mtd->dev); + /* We _know_ we aren't being removed, because our caller is still holding us here. So none of this try_ nonsense, and no bitching about it -- 2.31.1
WARNING: multiple messages have this Message-ID (diff)
From: "Rafał Miłecki" <zajec5@gmail.com> To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, Rob Herring <robh+dt@kernel.org>, Miquel Raynal <miquel.raynal@bootlin.com>, Richard Weinberger <richard@nod.at>, Vignesh Raghavendra <vigneshr@ti.com> Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, "Rafał Miłecki" <rafal@milecki.pl> Subject: [PATCH 1/3] mtd: core: call devm_of_platform_populate() for MTD devices Date: Wed, 22 Dec 2021 20:23:18 +0100 [thread overview] Message-ID: <20211222192320.21974-1-zajec5@gmail.com> (raw) From: Rafał Miłecki <rafal@milecki.pl> This adds support for bindings present in MTD devices (applies to partitions too) nodes. The purpose of this change is to allow drivers handle MTD device (partition) data. Some partitions may contain info that requires parsing & processing. An example can be U-Boot partition that contains block with environment variables somehwere in a middle. That block should be described in DT and parsed by a specific driver. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> --- drivers/mtd/mtdcore.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index 70f492dce158..07b75e6ca111 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c @@ -19,6 +19,7 @@ #include <linux/ioctl.h> #include <linux/init.h> #include <linux/of.h> +#include <linux/of_platform.h> #include <linux/proc_fs.h> #include <linux/idr.h> #include <linux/backing-dev.h> @@ -690,6 +691,9 @@ int add_mtd_device(struct mtd_info *mtd) not->add(mtd); mutex_unlock(&mtd_table_mutex); + + devm_of_platform_populate(&mtd->dev); + /* We _know_ we aren't being removed, because our caller is still holding us here. So none of this try_ nonsense, and no bitching about it -- 2.31.1 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
next reply other threads:[~2021-12-22 19:23 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-12-22 19:23 Rafał Miłecki [this message] 2021-12-22 19:23 ` [PATCH 1/3] mtd: core: call devm_of_platform_populate() for MTD devices Rafał Miłecki 2021-12-22 19:23 ` [PATCH 2/3] dt-bindings: nvmem: add U-Boot environment variables binding Rafał Miłecki 2021-12-22 19:23 ` Rafał Miłecki 2021-12-23 16:24 ` Pratyush Yadav 2021-12-23 16:24 ` Pratyush Yadav 2021-12-22 19:23 ` [PATCH 3/3] nvmem: add driver handling U-Boot environment variables Rafał Miłecki 2021-12-22 19:23 ` Rafał Miłecki 2021-12-27 5:13 ` kernel test robot 2021-12-27 5:13 ` kernel test robot 2021-12-27 5:13 ` 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=20211222192320.21974-1-zajec5@gmail.com \ --to=zajec5@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=rafal@milecki.pl \ --cc=richard@nod.at \ --cc=robh+dt@kernel.org \ --cc=srinivas.kandagatla@linaro.org \ --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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.