From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9244E30E0E5 for ; Tue, 5 May 2026 09:14:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777972484; cv=none; b=GeuDBVTuCDWqI3A5kbr4WfIfKZTvhFnH4VxARZxiQx3evi7BrKjgGUmjwC/p/XE4SHPm+kkMaH9GxbzZg7U1ndKhFdGNtdLlgHO20LFslNBU+1CHY/hg9Nc3Ee7o5DPQ9cD+JIS8UjAsLkbkH1/h5aq0+5gvFrPqNb570Y0eb/k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777972484; c=relaxed/simple; bh=hRaR1e+NxpuKvQEVQ4q6/F9zSFHctp91fdJ2Pa0v72w=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=m5RZX5SNXROx0Q6J9CjmTXZVaF0joRFeJYN4x6Z+mze05XSjJSUGxwfvEy6nSsU0loWV2TmT/ujGyNiVr7gBEbcvPlpASWGeMYRMurPP7GP6B4Xfz2SPtfbHYLefrBAIaq60KFnq0VujbGTi+SpzqCuXGvrpa3v7F0J/xIro/Q4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=tg883aDZ; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="tg883aDZ" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id E46171A3524 for ; Tue, 5 May 2026 09:14:39 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id AB5C06053C; Tue, 5 May 2026 09:14:39 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 8A86E11AD1663; Tue, 5 May 2026 11:14:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1777972479; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=OU0LUrVF8O9xwhrfP8VEQJ++uwZIPOTlu5Cg68O8L+Y=; b=tg883aDZPYSXOWoK+VjdQn2rxC1DwszVXf2tLmtuS5NXqyq8HSG1OcRotTBI9nvlY/owvZ RsnwDWGjFeoSZ7/2swGY/II1WACb7Lgs2q8iQDvN4/pys4B+t61rrtoSE6FTS9kbPjJ3tR IYI1vE8/No6M+P7vImpwNPJdq336qycRJy2FtOLHGbGp2T0S58PmphmkE6/irDxEkOREzN sVa38yMuL7sWf8UDIF7mjITiVa1qAWIaHBEFMzPIYDpVgegBKLch5FzLfEor3UD6MsnTHk kqAWQxa3WSCJilRRy2CIvKSt/DXv61huXq51XmSuTzhFhHkPBtHE801MVxJFjw== From: Miquel Raynal To: Mathieu Dubois-Briand Cc: Srinivas Kandagatla , =?utf-8?Q?Gr=C3=A9gory?= Clement , Thomas Petazzoni , linux-kernel@vger.kernel.org Subject: Re: [PATCH] nvmem: layouts: Add fixed-layout driver 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") References: <20260505-mathieu-nvmem-fixed-layout-v1-1-7f6ecbce108d@bootlin.com> User-Agent: mu4e 1.12.7; emacs 30.2 Date: Tue, 05 May 2026 11:14:38 +0200 Message-ID: <87cxzap69t.fsf@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Hi Mathieu, On 05/05/2026 at 10:42:10 +02, Mathieu Dubois-Briand 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 > --- > 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/Makef= ile > index 4940c9db0665..fbc195aa382c 100644 > --- a/drivers/nvmem/layouts/Makefile > +++ b/drivers/nvmem/layouts/Makefile > @@ -3,6 +3,7 @@ > # Makefile for nvmem layouts. > # >=20=20 > +obj-y +=3D 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 =3Dy? This is not a blocker, I have no strong opinion. Srinivas? > obj-$(CONFIG_NVMEM_LAYOUT_SL28_VPD) +=3D sl28vpd.o > obj-$(CONFIG_NVMEM_LAYOUT_ONIE_TLV) +=3D onie-tlv.o > obj-$(CONFIG_NVMEM_LAYOUT_U_BOOT_ENV) +=3D 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 > + */ > + > +#include > +#include Thanks, Miqu=C3=A8l