From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Cc: "Srinivas Kandagatla" <srini@kernel.org>,
"Grégory Clement" <gregory.clement@bootlin.com>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] nvmem: layouts: Add fixed-layout driver
Date: Tue, 05 May 2026 11:14:38 +0200 [thread overview]
Message-ID: <87cxzap69t.fsf@bootlin.com> (raw)
In-Reply-To: <20260505-mathieu-nvmem-fixed-layout-v1-1-7f6ecbce108d@bootlin.com> (Mathieu Dubois-Briand's message of "Tue, 05 May 2026 10:42:10 +0200")
Hi Mathieu,
On 05/05/2026 at 10:42:10 +02, Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> wrote:
> Current implementation isn't working well when device tree nodes have a
> phandle on a fixed-layout nvmem node. As the fixed layout is handled in
> nvmem core, no driver is ever associated with the layout, and the device
> consumer driver probe is deferred indefinitely.
>
> Remove the specific handling of fixed-layout and add a layout driver.
> This makes the fixed-layout similar to all other layouts, fixing the
> whole issue.
I guess this deserves a Fixes tag as well as a stable backport.
> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
> ---
> MAINTAINERS | 5 ++++
> drivers/nvmem/core.c | 23 +---------------
> drivers/nvmem/layouts.c | 11 --------
> drivers/nvmem/layouts/Makefile | 1 +
> drivers/nvmem/layouts/fixed-layout.c | 52 ++++++++++++++++++++++++++++++++++++
> include/linux/nvmem-provider.h | 7 +++++
> 6 files changed, 66 insertions(+), 33 deletions(-)
>
[...]
> diff --git a/drivers/nvmem/layouts/Makefile b/drivers/nvmem/layouts/Makefile
> index 4940c9db0665..fbc195aa382c 100644
> --- a/drivers/nvmem/layouts/Makefile
> +++ b/drivers/nvmem/layouts/Makefile
> @@ -3,6 +3,7 @@
> # Makefile for nvmem layouts.
> #
>
> +obj-y += fixed-layout.o
This implies that you cannot remove that driver. I'm fine with it, but
maybe since this is now almost costless, we could have a Kconfig entry
that defaults to =y? This is not a blocker, I have no strong
opinion. Srinivas?
> obj-$(CONFIG_NVMEM_LAYOUT_SL28_VPD) += sl28vpd.o
> obj-$(CONFIG_NVMEM_LAYOUT_ONIE_TLV) += onie-tlv.o
> obj-$(CONFIG_NVMEM_LAYOUT_U_BOOT_ENV) += u-boot-env.o
> diff --git a/drivers/nvmem/layouts/fixed-layout.c b/drivers/nvmem/layouts/fixed-layout.c
> new file mode 100644
> index 000000000000..e5078d72a6fc
> --- /dev/null
> +++ b/drivers/nvmem/layouts/fixed-layout.c
> @@ -0,0 +1,52 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright 2025 Bootlin
Can probably be bumped :-)
> + *
> + * Authors: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
> + */
> +
> +#include <linux/nvmem-provider.h>
> +#include <linux/of.h>
Thanks,
Miquèl
next prev parent reply other threads:[~2026-05-05 9:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-05 8:42 [PATCH] nvmem: layouts: Add fixed-layout driver Mathieu Dubois-Briand
2026-05-05 9:14 ` Miquel Raynal [this message]
2026-05-05 12:58 ` Mathieu Dubois-Briand
2026-05-05 13:15 ` Miquel Raynal
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=87cxzap69t.fsf@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=gregory.clement@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.dubois-briand@bootlin.com \
--cc=srini@kernel.org \
--cc=thomas.petazzoni@bootlin.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