[PATCH v3 2/2] nvmem: layouts: Make the fixed-layout driver optional

From: Mathieu Dubois-Briand

Date: Mon Jun 08 2026 - 09:44:40 EST


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@xxxxxxxxxxx>
---
drivers/nvmem/layouts/Kconfig | 9 +++++++++
drivers/nvmem/layouts/Makefile | 2 +-
2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/nvmem/layouts/Kconfig b/drivers/nvmem/layouts/Kconfig
index 5e586dfebe47..973d3147f109 100644
--- a/drivers/nvmem/layouts/Kconfig
+++ b/drivers/nvmem/layouts/Kconfig
@@ -8,6 +8,15 @@ if NVMEM_LAYOUTS

menu "Layout Types"

+config NVMEM_LAYOUT_FIXED_LAYOUT
+ tristate "Fixed layout support"
+ default y
+ 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 Y.
+
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