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

From: Miquel Raynal

Date: Mon May 18 2026 - 03:47:17 EST


Hi Mathieu,

On 15/05/2026 at 13:56:57 +02, Mathieu Dubois-Briand <mathieu.dubois-briand@xxxxxxxxxxx> wrote:

> 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/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.

This will break existing default configurations, and most of them rely
on the fixed layout. I believe this entry should default to =y.

Thanks,
Miquèl