From: "Rafał Miłecki" <rafal@milecki.pl>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: "Rafał Miłecki" <zajec5@gmail.com>,
"Srinivas Kandagatla" <srinivas.kandagatla@linaro.org>,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
"Alessandro Zummo" <a.zummo@towertech.it>,
"Vignesh Raghavendra" <vigneshr@ti.com>,
"Kunihiko Hayashi" <hayashi.kunihiko@socionext.com>,
linux-mtd@lists.infradead.org,
"Miquel Raynal" <miquel.raynal@bootlin.com>,
"Evgeniy Polyakov" <zbr@ioremap.net>,
"Fabio Estevam" <festevam@gmail.com>,
linux-stm32@st-md-mailman.stormreply.com,
"Alyssa Rosenzweig" <alyssa@rosenzweig.io>,
"Heiko Stuebner" <heiko@sntech.de>,
linux-rtc@vger.kernel.org, "Samuel Holland" <samuel@sholland.org>,
"Richard Weinberger" <richard@nod.at>,
"Michal Simek" <michal.simek@xilinx.com>,
"Jernej Skrabec" <jernej.skrabec@gmail.com>,
linux-rockchip@lists.infradead.org,
"Chen-Yu Tsai" <wens@csie.org>, "Andy Gross" <agross@kernel.org>,
"NXP Linux Team" <linux-imx@nxp.com>,
"Vincent Shih" <vincent.sunplus@gmail.com>,
"Orson Zhai" <orsonzhai@gmail.com>,
"Jerome Brunet" <jbrunet@baylibre.com>,
linux-sunxi@lists.linux.dev, asahi@lists.linux.dev,
"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
"Sven Peter" <sven@svenpeter.dev>,
"Martin Blumenstingl" <martin.blumenstingl@googlemail.com>,
linux-arm-msm@vger.kernel.org,
"Sascha Hauer" <s.hauer@pengutronix.de>,
linux-mediatek@lists.infradead.org,
"Baolin Wang" <baolin.wang@linux.alibaba.com>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
linux-amlogic@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Chunyan Zhang" <zhang.lyra@gmail.com>,
"Bjorn Andersson" <andersson@kernel.org>,
"Hector Martin" <marcan@marcan.st>,
linux-kernel@vger.kernel.org,
"Konrad Dybcio" <konrad.dybcio@linaro.org>,
"Michael Walle" <michael@walle.cc>,
"Masami Hiramatsu" <mhiramat@kernel.org>,
"Pengutronix Kernel Team" <kernel@pengutronix.de>,
"Kevin Hilman" <khilman@baylibre.com>,
"Shawn Guo" <shawnguo@kernel.org>,
"Claudiu Beznea" <claudiu.beznea@microchip.com>
Subject: Re: [Linux-stm32] [PATCH V4] nvmem: add explicit config option to read old syntax fixed OF cells
Date: Tue, 18 Jul 2023 11:19:49 +0200 [thread overview]
Message-ID: <d51234ebc05d2b9fe44625299c103caa@milecki.pl> (raw)
In-Reply-To: <e5a8524c-8961-9ff0-db30-3b648345319e@pengutronix.de>
Hi Ahmad,
On 2023-07-18 11:08, Ahmad Fatoum wrote:
>> diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
>> index 60670b2f70b9..334adbae3690 100644
>> --- a/drivers/mtd/mtdcore.c
>> +++ b/drivers/mtd/mtdcore.c
>> @@ -522,6 +522,7 @@ static int mtd_nvmem_add(struct mtd_info *mtd)
>> config.dev = &mtd->dev;
>> config.name = dev_name(&mtd->dev);
>> config.owner = THIS_MODULE;
>> + config.add_legacy_fixed_of_cells = of_device_is_compatible(node,
>> "nvmem-cells");
>
> How does the new binding look like in this situation?
>
> Before it was:
>
> &{flash/partitions} {
> compatible = "fixed-partitions";
> #address-cells = <1>;
> #size-cells = <1>;
>
> partition@0 {
> compatible = "nvmem-cells";
> reg = <0 0x100>;
> #address-cells = <1>;
> #size-cells = <1>;
>
> calib@1 {
> reg = <1 1>;
> };
> }
> };
>
> It it now the same, but s/"nvmem-cells"/"fixed-layout"/ ?
Please take a look at those commits and examples:
bd912c991d2e ("dt-bindings: nvmem: layouts: add fixed-layout")
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bd912c991d2ef079a32558f057b8663bcf1fb6fc
fa7fbe53ecdc ("dt-bindings: nvmem: convert base example to use NVMEM
fixed cells layout")
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fa7fbe53ecdc4e7d549a9f73a40e257b0046b4b9
Basically you need a "nvmem-layout" node with:
compatible = "fixed-layout";
So in your case that would be:
&{flash/partitions} {
compatible = "fixed-partitions";
partition@0 {
reg = <0 0x100>;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
calib@1 {
reg = <1 1>;
};
};
}
};
next prev parent reply other threads:[~2023-07-18 9:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-03 22:55 [PATCH V4] nvmem: add explicit config option to read old syntax fixed OF cells Rafał Miłecki
2023-04-04 16:57 ` Jernej Škrabec
2023-04-05 13:01 ` Heiko Stübner
2023-07-18 7:20 ` Rafał Miłecki
2023-07-18 9:08 ` [Linux-stm32] " Ahmad Fatoum
2023-07-18 9:19 ` Rafał Miłecki [this message]
2023-09-25 9:00 ` Srinivas Kandagatla
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=d51234ebc05d2b9fe44625299c103caa@milecki.pl \
--to=rafal@milecki.pl \
--cc=a.fatoum@pengutronix.de \
--cc=a.zummo@towertech.it \
--cc=agross@kernel.org \
--cc=alexandre.belloni@bootlin.com \
--cc=alyssa@rosenzweig.io \
--cc=andersson@kernel.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=asahi@lists.linux.dev \
--cc=baolin.wang@linux.alibaba.com \
--cc=claudiu.beznea@microchip.com \
--cc=festevam@gmail.com \
--cc=hayashi.kunihiko@socionext.com \
--cc=heiko@sntech.de \
--cc=jbrunet@baylibre.com \
--cc=jernej.skrabec@gmail.com \
--cc=kernel@pengutronix.de \
--cc=khilman@baylibre.com \
--cc=konrad.dybcio@linaro.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-rtc@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux-sunxi@lists.linux.dev \
--cc=marcan@marcan.st \
--cc=martin.blumenstingl@googlemail.com \
--cc=matthias.bgg@gmail.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=mhiramat@kernel.org \
--cc=michael@walle.cc \
--cc=michal.simek@xilinx.com \
--cc=miquel.raynal@bootlin.com \
--cc=neil.armstrong@linaro.org \
--cc=orsonzhai@gmail.com \
--cc=richard@nod.at \
--cc=s.hauer@pengutronix.de \
--cc=samuel@sholland.org \
--cc=shawnguo@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=sven@svenpeter.dev \
--cc=vigneshr@ti.com \
--cc=vincent.sunplus@gmail.com \
--cc=wens@csie.org \
--cc=zajec5@gmail.com \
--cc=zbr@ioremap.net \
--cc=zhang.lyra@gmail.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