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 9E7FDEB64DD for ; Mon, 7 Aug 2023 07:20:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229825AbjHGHU4 (ORCPT ); Mon, 7 Aug 2023 03:20:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229487AbjHGHUy (ORCPT ); Mon, 7 Aug 2023 03:20:54 -0400 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40006A7 for ; Mon, 7 Aug 2023 00:20:50 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 9476460002; Mon, 7 Aug 2023 07:20:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1691392849; 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=lN+F26YYEeoRtEr454n7rUo+u7fYWChu8iHItg+7Ueg=; b=Uwa0CvgWrIchh3SmriR3bgQqGjhskQWepch5nWkJMZOCSHz0e0kA1bZrcBUs0OPMrTUfB3 3FmGDzczYmE7e/yTLT+JUWs7YC5Qx/YEkARe4/kbqo5bxQASgATXibvMbNYNw/586/ce0n nR9I1OZs6NXvrWs8xCOakKMRd9eP5ex/92k0ltrWXL3VqMRfsJ7docviLegPV0quCZJywz fnQc+dKGx7B9RQgdKgfpbsv9r42/s4UOJU5ZpgmlVUet/DgpEjvJCvzYOaOhmDpNguJoR9 qg1pMHzJ7vp4OMjVtAW3wFqYCLkdX4ws8skEesFA6m3QTY0+vIVdBLFL8e4OvA== Date: Mon, 7 Aug 2023 09:20:47 +0200 From: Miquel Raynal To: Daniel Golle Cc: Srinivas Kandagatla , Greg Kroah-Hartman , Thomas Petazzoni , Robert Marko , Luka Perkov , Michael Walle , linux-kernel@vger.kernel.org, Randy Dunlap , Chen-Yu Tsai , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= Subject: Re: [PATCH v7 6/7] ABI: sysfs-nvmem-cells: Expose cells through sysfs Message-ID: <20230807092047.1525e6a5@xps-13> In-Reply-To: References: <20230801182132.1058707-1-miquel.raynal@bootlin.com> <20230801182132.1058707-7-miquel.raynal@bootlin.com> 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 X-GND-Sasl: miquel.raynal@bootlin.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Daniel, daniel@makrotopia.org wrote on Sat, 5 Aug 2023 15:50:41 +0100: > On Tue, Aug 01, 2023 at 08:21:31PM +0200, Miquel Raynal wrote: > > The binary content of nvmem devices is available to the user so in the > > easiest cases, finding the content of a cell is rather easy as it is > > just a matter of looking at a known and fixed offset. However, nvmem > > layouts have been recently introduced to cope with more advanced > > situations, where the offset and size of the cells is not known in > > advance or is dynamic. When using layouts, more advanced parsers are > > used by the kernel in order to give direct access to the content of each > > cell regardless of their position/size in the underlying device, but > > these information were not accessible to the user. > >=20 > > By exposing the nvmem cells to the user through a dedicated cell/ folder > > containing one file per cell, we provide a straightforward access to > > useful user information without the need for re-writing a userland > > parser. Content of nvmem cells is usually: product names, manufacturing > > date, MAC addresses, etc, > >=20 > > Signed-off-by: Miquel Raynal > > Reviewed-by: Greg Kroah-Hartman > > --- > > Documentation/ABI/testing/sysfs-nvmem-cells | 21 +++++++++++++++++++++ > > 1 file changed, 21 insertions(+) > > create mode 100644 Documentation/ABI/testing/sysfs-nvmem-cells > >=20 > > diff --git a/Documentation/ABI/testing/sysfs-nvmem-cells b/Documentatio= n/ABI/testing/sysfs-nvmem-cells > > new file mode 100644 > > index 000000000000..a1d140dcbd5d > > --- /dev/null > > +++ b/Documentation/ABI/testing/sysfs-nvmem-cells > > @@ -0,0 +1,21 @@ > > +What: /sys/bus/nvmem/devices/.../cells/ > > +Date: May 2023 > > +KernelVersion: 6.5 > > +Contact: Miquel Raynal > > +Description: > > + The "cells" folder contains one file per cell exposed by the > > + NVMEM device. The name of the file is: @, with > > + being the cell name and its location in the NVMEM > > + device, in hexadecimal (without the '0x' prefix, to mimic device > > + tree node names). The length of the file is the size of the cell > > + (when known). The content of the file is the binary content of > > + the cell (may sometimes be ASCII, likely without trailing > > + character). > > + Note: This file is only present if CONFIG_NVMEM_SYSFS > > + is enabled. > > + > > + Example:: > > + > > + hexdump -C /sys/bus/nvmem/devices/1-00563/cells/product-name =20 >=20 > Location is missing here, should be something like > hexdump -C /sys/bus/nvmem/devices/1-00563/cells/product-name@f00 Yes. I forgot to update the cover letter as well. I will do it in next version. Thanks, Miqu=C3=A8l