From: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
To: Srinivas Kandagatla <srini@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Miquel Raynal" <miquel.raynal@bootlin.com>,
"Grégory Clement" <gregory.clement@bootlin.com>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
"Mathieu Dubois-Briand" <mathieu.dubois-briand@bootlin.com>
Subject: [PATCH v2 2/2] nvmem: layouts: Make the fixed-layout driver optional
Date: Fri, 15 May 2026 13:56:57 +0200 [thread overview]
Message-ID: <20260515-mathieu-nvmem-fixed-layout-v2-2-8ac215dd4016@bootlin.com> (raw)
In-Reply-To: <20260515-mathieu-nvmem-fixed-layout-v2-0-8ac215dd4016@bootlin.com>
The fixed-layout support is now managed by a separate driver, so we can
make this support optional. This aligns with the approach taken for
other layout drivers.
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
---
drivers/nvmem/core.c | 1 +
drivers/nvmem/layouts/Kconfig | 8 ++++++++
drivers/nvmem/layouts/Makefile | 2 +-
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index 0ec4924c4bda..594180d4b889 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -834,6 +834,7 @@ int nvmem_add_cells_from_dt(struct nvmem_device *nvmem, struct device_node *np)
return 0;
}
+EXPORT_SYMBOL_GPL(nvmem_add_cells_from_dt);
static int nvmem_add_cells_from_legacy_of(struct nvmem_device *nvmem)
{
diff --git a/drivers/nvmem/layouts/Kconfig b/drivers/nvmem/layouts/Kconfig
index 5e586dfebe47..f823d56210a3 100644
--- a/drivers/nvmem/layouts/Kconfig
+++ b/drivers/nvmem/layouts/Kconfig
@@ -8,6 +8,14 @@ if NVMEM_LAYOUTS
menu "Layout Types"
+config NVMEM_LAYOUT_FIXED_LAYOUT
+ tristate "Fixed layout support"
+ help
+ Say Y here to enable support for NVMEM fixed layout, which provides a
+ way to describe memory cells with fixed offsets and sizes.
+
+ If unsure, say N.
+
config NVMEM_LAYOUT_SL28_VPD
tristate "Kontron sl28 VPD layout support"
select CRC8
diff --git a/drivers/nvmem/layouts/Makefile b/drivers/nvmem/layouts/Makefile
index dd6c6c70b1a9..9da790a9dde9 100644
--- a/drivers/nvmem/layouts/Makefile
+++ b/drivers/nvmem/layouts/Makefile
@@ -3,7 +3,7 @@
# Makefile for nvmem layouts.
#
-obj-$(CONFIG_NVMEM_LAYOUTS) += fixed-layout.o
+obj-$(CONFIG_NVMEM_LAYOUT_FIXED_LAYOUT) += fixed-layout.o
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
--
2.47.3
prev parent reply other threads:[~2026-05-15 11:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 11:56 [PATCH v2 0/2] nvmem: layouts: Add fixed-layout driver Mathieu Dubois-Briand
2026-05-15 11:56 ` [PATCH v2 1/2] " Mathieu Dubois-Briand
2026-05-15 11:56 ` Mathieu Dubois-Briand [this message]
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=20260515-mathieu-nvmem-fixed-layout-v2-2-8ac215dd4016@bootlin.com \
--to=mathieu.dubois-briand@bootlin.com \
--cc=gregkh@linuxfoundation.org \
--cc=gregory.clement@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=miquel.raynal@bootlin.com \
--cc=srini@kernel.org \
--cc=stable@vger.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