From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6EA77C3DA7D for ; Tue, 3 Jan 2023 15:39:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237290AbjACPjP (ORCPT ); Tue, 3 Jan 2023 10:39:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233267AbjACPjL (ORCPT ); Tue, 3 Jan 2023 10:39:11 -0500 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E868411C0E; Tue, 3 Jan 2023 07:39:08 -0800 (PST) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 2699FFF817; Tue, 3 Jan 2023 15:39:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1672760346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2L+bmmDM9ro1mRFPeFaf7i57I/YynxK9X8KdSETgfrY=; b=PoDfyemwnltiOnVsaV2CPslGfqPYBBt9PRlRQ76lJEosH//uKHo2X9z5nabXK50loQu7dm 9tgOo5XZu1gF3Pn5gKV82UHaO7XI0mUgq3Q4crPxNvvY1T5UqL9/hh5nNsTDymognQI6PM fw8UVg71ALpiXdBw+kXoBPPOnl/kKjn6b9fCqitrtWvBWBI2n1CknbkU1S1t5rm7V8AbZK 9UfVy1UYt7xbehEJcxOHAydf17PX9tfI7jX2hGUXg+oQ9tT2lVCkL/dh6ZLnf0eejkF22l 3gaaPYyMPQOx8EeKacDo5kSfJyGgN+uDxYQpJjgYpHgQcUe9LfgMYhDNPgC46g== Date: Tue, 3 Jan 2023 16:39:02 +0100 From: Miquel Raynal To: Michael Walle Cc: Jonathan Corbet , Srinivas Kandagatla , Rob Herring , Frank Rowand , Sascha Hauer , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Dan Carpenter Subject: Re: [PATCH v5 00/21] nvmem: core: introduce NVMEM layouts Message-ID: <20230103163902.218cb5c7@xps-13> In-Reply-To: <20221206200740.3567551-1-michael@walle.cc> References: <20221206200740.3567551-1-michael@walle.cc> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org Hi Srinivas, michael@walle.cc wrote on Tue, 6 Dec 2022 21:07:19 +0100: > This is now the third attempt to fetch the MAC addresses from the VPD > for the Kontron sl28 boards. Previous discussions can be found here: > https://lore.kernel.org/lkml/20211228142549.1275412-1-michael@walle.cc/ >=20 >=20 > NVMEM cells are typically added by board code or by the devicetree. But > as the cells get more complex, there is (valid) push back from the > devicetree maintainers to not put that handling in the devicetree. >=20 > Therefore, introduce NVMEM layouts. They operate on the NVMEM device and > can add cells during runtime. That way it is possible to add more complex > cells than it is possible right now with the offset/length/bits > description in the device tree. For example, you can have post processing > for individual cells (think of endian swapping, or ethernet offset > handling). >=20 > The imx-ocotp driver is the only user of the global post processing hook, > convert it to nvmem layouts and drop the global post pocessing hook. >=20 > For now, the layouts are selected by the device tree. But the idea is > that also board files or other drivers could set a layout. Although no > code for that exists yet. >=20 > Thanks to Miquel, the device tree bindings are already approved and merge= d. >=20 > NVMEM layouts as modules? > While possible in principle, it doesn't make any sense because the NVMEM > core can't be compiled as a module. The layouts needs to be available at > probe time. (That is also the reason why they get registered with > subsys_initcall().) So if the NVMEM core would be a module, the layouts > could be modules, too. I believe this series still applies even though -rc1 (and -rc2) are out now, may we know if you consider merging it anytime soon or if there are still discrepancies in the implementation you would like to discuss? Otherwise I would really like to see this laying in -next a few weeks before being sent out to Linus, just in case. Thanks, Miqu=C3=A8l From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 432ABC46467 for ; Tue, 3 Jan 2023 17:39:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hrbcE0U9/U1ZwZJXxIEzEDmyZqa+gwo96AIeKSiqI34=; b=dhJjFlbGFH+VZk IDzx5yyW2Ml1eDGmDoLVEzv3OtnqUO/zQX8+e5ewRE+bBmmOZhI10fEljTNlv+QbIhv+POSBY7X2u 8KysogvD4fjQN33PU+18ZNfFuyhZa5GPdZnuo/Vz2KeQs27POLFKFKhICULjMlVKL3pTErv99Rodt nVoKytWwpC5vIv67NSnMcMkGbg4f44AppTuMb2wTNh8NyaRvVGyFvI+pWGa7gFHCxjCa9la0Gsunr stawHJa0FGy1CWasIuTn4OPeBtrcuvCCnUCxV+LVnlu5LPAjzmVCkK5oAz+jkrWbHPt0XgWEMwoLl Rc+2L9lrKz97b1B6r+Lw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pClEb-003U4L-4Y; Tue, 03 Jan 2023 17:37:58 +0000 Received: from relay9-d.mail.gandi.net ([2001:4b98:dc4:8::229]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pCjNh-002WgD-S7 for linux-arm-kernel@lists.infradead.org; Tue, 03 Jan 2023 15:39:16 +0000 Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 2699FFF817; Tue, 3 Jan 2023 15:39:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1672760346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2L+bmmDM9ro1mRFPeFaf7i57I/YynxK9X8KdSETgfrY=; b=PoDfyemwnltiOnVsaV2CPslGfqPYBBt9PRlRQ76lJEosH//uKHo2X9z5nabXK50loQu7dm 9tgOo5XZu1gF3Pn5gKV82UHaO7XI0mUgq3Q4crPxNvvY1T5UqL9/hh5nNsTDymognQI6PM fw8UVg71ALpiXdBw+kXoBPPOnl/kKjn6b9fCqitrtWvBWBI2n1CknbkU1S1t5rm7V8AbZK 9UfVy1UYt7xbehEJcxOHAydf17PX9tfI7jX2hGUXg+oQ9tT2lVCkL/dh6ZLnf0eejkF22l 3gaaPYyMPQOx8EeKacDo5kSfJyGgN+uDxYQpJjgYpHgQcUe9LfgMYhDNPgC46g== Date: Tue, 3 Jan 2023 16:39:02 +0100 From: Miquel Raynal To: Michael Walle Cc: Jonathan Corbet , Srinivas Kandagatla , Rob Herring , Frank Rowand , Sascha Hauer , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Dan Carpenter Subject: Re: [PATCH v5 00/21] nvmem: core: introduce NVMEM layouts Message-ID: <20230103163902.218cb5c7@xps-13> In-Reply-To: <20221206200740.3567551-1-michael@walle.cc> References: <20221206200740.3567551-1-michael@walle.cc> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230103_073914_130638_5D1F63B0 X-CRM114-Status: GOOD ( 25.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org SGkgU3Jpbml2YXMsCgptaWNoYWVsQHdhbGxlLmNjIHdyb3RlIG9uIFR1ZSwgIDYgRGVjIDIwMjIg MjE6MDc6MTkgKzAxMDA6Cgo+IFRoaXMgaXMgbm93IHRoZSB0aGlyZCBhdHRlbXB0IHRvIGZldGNo IHRoZSBNQUMgYWRkcmVzc2VzIGZyb20gdGhlIFZQRAo+IGZvciB0aGUgS29udHJvbiBzbDI4IGJv YXJkcy4gUHJldmlvdXMgZGlzY3Vzc2lvbnMgY2FuIGJlIGZvdW5kIGhlcmU6Cj4gaHR0cHM6Ly9s b3JlLmtlcm5lbC5vcmcvbGttbC8yMDIxMTIyODE0MjU0OS4xMjc1NDEyLTEtbWljaGFlbEB3YWxs ZS5jYy8KPiAKPiAKPiBOVk1FTSBjZWxscyBhcmUgdHlwaWNhbGx5IGFkZGVkIGJ5IGJvYXJkIGNv ZGUgb3IgYnkgdGhlIGRldmljZXRyZWUuIEJ1dAo+IGFzIHRoZSBjZWx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