Message ID | 20230717075147.43326-2-miquel.raynal@bootlin.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp971850vqt; Mon, 17 Jul 2023 01:10:29 -0700 (PDT) X-Google-Smtp-Source: APBJJlF0OH1RZbXKC1uV2dDL0X56Pn0XhWdyNlnVMLAbZV/oE8HGL2J7znQ6vgUS5gnbjD6JwAaz X-Received: by 2002:a05:6a20:258c:b0:133:83b5:c3cd with SMTP id k12-20020a056a20258c00b0013383b5c3cdmr13609784pzd.53.1689581428794; Mon, 17 Jul 2023 01:10:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689581428; cv=none; d=google.com; s=arc-20160816; b=eOm17mzoIkywZvSkyXEzpvkmNhLgXOnYHe3al74+Sx2VdZdZiTsZ8ODf7UHUXT3MUj auhPLDFOPGIDihaBBL9vznmCRN0pkEEEBxxWvH9vEWq17b9sxbB+e838oASZfsxBA8rs 9kasYnhi+9FLRWIfJ0V3jLM4v4zX7Z/mfvJJpo24UM5HEXLBvlgSuD4Sqk7UEuO+UibL ebLsjgdN0BiLON9RZAoC1vpN00fsiZT2UrT7JaVuuHnXTJgvYBR2eq8BjWMsG/nWqgQR ikwhijiYlSrts2vckc/P1KUbBIAwt6V8EwpeHMmTYpnWwXIRjb1gdfx91hCB6xPLmHV4 NjjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nH6/LjRkYId88yq613RlWdOphmfE4iRu7Ck+Oxwm0yc=; fh=JpygR/0v0UTOXdyljMXVkuezv/HjT4xrIjOwJ6y50X0=; b=QQIjxQTdMtyg4y5NkA/XJ4NWqR1pWMOKkGcLAxpHLVplAY/ewsXL4fXV4o/mPbWieU 1WiMvG9moomJSCzvhtB8GyGlXsN1zhD08z5LCCXobA9HH9bxTtMrpxyG7hcZobeE4tm3 tBy5VD7fDMcET+gMrQmd/LmKA1N9W0JQaVxwl3Z0jXj7ngTOBdnCa4MarY+AIo0PBynU ky5NoWeJMOFPDSz24VDvfuBMRIzZ/sEPtBTPreDxwYPsTe+Lg53uHDI3QUImd8nzmRm5 8hMbu5dgdniC3Ay+a2vr5nrVC0zcWvwkYu3aXpYZCuC7XFLmMPcCPMQHPNHE0hb4siCE QlVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=WDkqvzg8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bv10-20020a056a00414a00b006724753efe8si11157318pfb.192.2023.07.17.01.10.16; Mon, 17 Jul 2023 01:10:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=WDkqvzg8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231202AbjGQHwW (ORCPT <rfc822;hadasmailinglist@gmail.com> + 99 others); Mon, 17 Jul 2023 03:52:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231186AbjGQHwD (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 17 Jul 2023 03:52:03 -0400 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::223]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77576118 for <linux-kernel@vger.kernel.org>; Mon, 17 Jul 2023 00:51:53 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 7811C60007; Mon, 17 Jul 2023 07:51:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1689580311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nH6/LjRkYId88yq613RlWdOphmfE4iRu7Ck+Oxwm0yc=; b=WDkqvzg8QAfJqTq4uPlJhLx4c7ON8Cote9uwAPhSzr8+CJy20QpkqHe28R/g8CfLl3pJuJ +QGUPfERJPkT6c9ZYfzQj8zwSFVhCzvCJxUGXrlLy5RzDHHSISRHCuxhSIgulWpbjB81KL 70XZc+DOzkMOjBw1uHYInwhVjcF/Y208/M96Yr1ZlfI2ltPEgV/x9VXYIGt46UuEYbNxhX XX45Bpn1e0TSLhRWK1pigr9VKlatROaI4ATRrdl7TgOp1ncXtdPWBXGcYR71sIBYoyS1+D 6Mv/8wk8U9BtgntdJqlGZRdlnhEAu0DUbpJnQd7+ZMreKIhEIsm+ediXMETSfQ== From: Miquel Raynal <miquel.raynal@bootlin.com> To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, <linux-kernel@vger.kernel.org> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>, Robert Marko <robert.marko@sartura.hr>, Luka Perkov <luka.perkov@sartura.hr>, Michael Walle <michael@walle.cc>, Randy Dunlap <rdunlap@infradead.org>, Miquel Raynal <miquel.raynal@bootlin.com> Subject: [PATCH v6 1/3] ABI: sysfs-nvmem-cells: Expose cells through sysfs Date: Mon, 17 Jul 2023 09:51:45 +0200 Message-Id: <20230717075147.43326-2-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230717075147.43326-1-miquel.raynal@bootlin.com> References: <20230717075147.43326-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-GND-Sasl: miquel.raynal@bootlin.com X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771654536529091473 X-GMAIL-MSGID: 1771654536529091473 |
Series |
NVMEM cells in sysfs
|
|
Commit Message
Miquel Raynal
July 17, 2023, 7:51 a.m. UTC
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. 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, Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- Documentation/ABI/testing/sysfs-nvmem-cells | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-nvmem-cells
Comments
Hi Miquel, On Mon, 17 Jul 2023, at 07:51, 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. > > 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, > > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> > Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > --- > Documentation/ABI/testing/sysfs-nvmem-cells | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > create mode 100644 Documentation/ABI/testing/sysfs-nvmem-cells > > diff --git a/Documentation/ABI/testing/sysfs-nvmem-cells > b/Documentation/ABI/testing/sysfs-nvmem-cells > new file mode 100644 > index 000000000000..b2d15a8d36e5 > --- /dev/null > +++ b/Documentation/ABI/testing/sysfs-nvmem-cells > @@ -0,0 +1,19 @@ > +What: /sys/bus/nvmem/devices/.../cells/<cell-name> > +Date: May 2023 > +KernelVersion: 6.5 > +Contact: Miquel Raynal <miquel.raynal@bootlin.com> > +Description: > + The "cells" folder contains one file per cell exposed by > + the nvmem device. The name of the file is the cell name. Could we consider using a file within a folder (name defined by cell propertys) to access the cell bytes? Example (pick the best path and filename): /sys/bus/nvmem/devices/.../cells/<cell-name>/bytes That way, it is much easier to expand this at a later stage, like adding an of_node link at /sys/bus/nvmem/devices/.../cells/<cell-name>/of_node or exposing other nvmem cell properties. This is particularly relevant given the cell-name alone does not always uniquely represent a cell on an nvmem device. https://lore.kernel.org/lkml/ZLaZ7fzUSsa0Igx1@makrotopia.org/ https://lore.kernel.org/lkml/e7173ab2-d3b2-4f75-beb8-32593b868774@www.fastmail.com/ > + 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 > + 00000000 54 4e 34 38 4d 2d 50 2d 44 4e |TN48M-P-DN| > + 0000000a > -- > 2.34.1 Cheers,
Hi John, Srinivas, a question for you below. lists@johnthomson.fastmail.com.au wrote on Sun, 23 Jul 2023 19:39:50 +0000: > Hi Miquel, > > On Mon, 17 Jul 2023, at 07:51, 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. > > > > 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, > > > > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> > > Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > > --- > > Documentation/ABI/testing/sysfs-nvmem-cells | 19 +++++++++++++++++++ > > 1 file changed, 19 insertions(+) > > create mode 100644 Documentation/ABI/testing/sysfs-nvmem-cells > > > > diff --git a/Documentation/ABI/testing/sysfs-nvmem-cells > > b/Documentation/ABI/testing/sysfs-nvmem-cells > > new file mode 100644 > > index 000000000000..b2d15a8d36e5 > > --- /dev/null > > +++ b/Documentation/ABI/testing/sysfs-nvmem-cells > > @@ -0,0 +1,19 @@ > > +What: /sys/bus/nvmem/devices/.../cells/<cell-name> > > +Date: May 2023 > > +KernelVersion: 6.5 > > +Contact: Miquel Raynal <miquel.raynal@bootlin.com> > > +Description: > > + The "cells" folder contains one file per cell exposed by > > + the nvmem device. The name of the file is the cell name. > > Could we consider using a file within a folder (name defined by cell propertys) to access the cell bytes? > Example (pick the best path and filename): > /sys/bus/nvmem/devices/.../cells/<cell-name>/bytes > > That way, it is much easier to expand this at a later stage, > like adding an of_node link at > /sys/bus/nvmem/devices/.../cells/<cell-name>/of_node > or exposing other nvmem cell properties. I have no strong opinion. Srinivas what do you prefer? I'm fine either ways. I like the simplicity of the current approach more, but it's true that it is more easy to make it grow if we follow John idea. > This is particularly relevant given the cell-name alone does not always > uniquely represent a cell on an nvmem device. > https://lore.kernel.org/lkml/ZLaZ7fzUSsa0Igx1@makrotopia.org/ It seems like this is gonna be fixed by suffixing @<offset> to the name, as anyway whatever solution we choose, it is gonna be needed. > https://lore.kernel.org/lkml/e7173ab2-d3b2-4f75-beb8-32593b868774@www.fastmail.com/ > > > + 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 > > + 00000000 54 4e 34 38 4d 2d 50 2d 44 4e |TN48M-P-DN| > > + 0000000a > > -- > > 2.34.1 > > Cheers, > Thanks, Miquèl
On 31/07/2023 16:51, Miquel Raynal wrote: > Hi John, > > Srinivas, a question for you below. > > lists@johnthomson.fastmail.com.au wrote on Sun, 23 Jul 2023 19:39:50 > +0000: > >> Hi Miquel, >> >> On Mon, 17 Jul 2023, at 07:51, 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. >>> >>> 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, >>> >>> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> >>> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> >>> --- >>> Documentation/ABI/testing/sysfs-nvmem-cells | 19 +++++++++++++++++++ >>> 1 file changed, 19 insertions(+) >>> create mode 100644 Documentation/ABI/testing/sysfs-nvmem-cells >>> >>> diff --git a/Documentation/ABI/testing/sysfs-nvmem-cells >>> b/Documentation/ABI/testing/sysfs-nvmem-cells >>> new file mode 100644 >>> index 000000000000..b2d15a8d36e5 >>> --- /dev/null >>> +++ b/Documentation/ABI/testing/sysfs-nvmem-cells >>> @@ -0,0 +1,19 @@ >>> +What: /sys/bus/nvmem/devices/.../cells/<cell-name> >>> +Date: May 2023 >>> +KernelVersion: 6.5 >>> +Contact: Miquel Raynal <miquel.raynal@bootlin.com> >>> +Description: >>> + The "cells" folder contains one file per cell exposed by >>> + the nvmem device. The name of the file is the cell name. >> >> Could we consider using a file within a folder (name defined by cell propertys) to access the cell bytes? >> Example (pick the best path and filename): >> /sys/bus/nvmem/devices/.../cells/<cell-name>/bytes >> >> That way, it is much easier to expand this at a later stage, >> like adding an of_node link at >> /sys/bus/nvmem/devices/.../cells/<cell-name>/of_node >> or exposing other nvmem cell properties. > > I have no strong opinion. Srinivas what do you prefer? I'm fine either > ways. I like the simplicity of the current approach more, but it's true > that it is more easy to make it grow if we follow John idea. Sounds sensible to me. > >> This is particularly relevant given the cell-name alone does not always >> uniquely represent a cell on an nvmem device. >> https://lore.kernel.org/lkml/ZLaZ7fzUSsa0Igx1@makrotopia.org/ > > It seems like this is gonna be fixed by suffixing @<offset> to the > name, as anyway whatever solution we choose, it is gonna be needed. we have to be careful here not to break the nvmem_cell_get() users. --srini > >> https://lore.kernel.org/lkml/e7173ab2-d3b2-4f75-beb8-32593b868774@www.fastmail.com/ >> >>> + 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 >>> + 00000000 54 4e 34 38 4d 2d 50 2d 44 4e |TN48M-P-DN| >>> + 0000000a >>> -- >>> 2.34.1 >> >> Cheers, >> > > > Thanks, > Miquèl
Hello, srinivas.kandagatla@linaro.org wrote on Tue, 1 Aug 2023 10:06:14 +0100: > On 31/07/2023 16:51, Miquel Raynal wrote: > > Hi John, > > > > Srinivas, a question for you below. > > > > lists@johnthomson.fastmail.com.au wrote on Sun, 23 Jul 2023 19:39:50 > > +0000: > > > >> Hi Miquel, > >> > >> On Mon, 17 Jul 2023, at 07:51, 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. > >>> > >>> 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, > >>> > >>> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> > >>> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > >>> --- > >>> Documentation/ABI/testing/sysfs-nvmem-cells | 19 +++++++++++++++++++ > >>> 1 file changed, 19 insertions(+) > >>> create mode 100644 Documentation/ABI/testing/sysfs-nvmem-cells > >>> > >>> diff --git a/Documentation/ABI/testing/sysfs-nvmem-cells > >>> b/Documentation/ABI/testing/sysfs-nvmem-cells > >>> new file mode 100644 > >>> index 000000000000..b2d15a8d36e5 > >>> --- /dev/null > >>> +++ b/Documentation/ABI/testing/sysfs-nvmem-cells > >>> @@ -0,0 +1,19 @@ > >>> +What: /sys/bus/nvmem/devices/.../cells/<cell-name> > >>> +Date: May 2023 > >>> +KernelVersion: 6.5 > >>> +Contact: Miquel Raynal <miquel.raynal@bootlin.com> > >>> +Description: > >>> + The "cells" folder contains one file per cell exposed by > >>> + the nvmem device. The name of the file is the cell name. > >> > >> Could we consider using a file within a folder (name defined by cell propertys) to access the cell bytes? > >> Example (pick the best path and filename): > >> /sys/bus/nvmem/devices/.../cells/<cell-name>/bytes > >> > >> That way, it is much easier to expand this at a later stage, > >> like adding an of_node link at > >> /sys/bus/nvmem/devices/.../cells/<cell-name>/of_node > >> or exposing other nvmem cell properties. > > > > I have no strong opinion. Srinivas what do you prefer? I'm fine either > > ways. I like the simplicity of the current approach more, but it's true > > that it is more easy to make it grow if we follow John idea. > > Sounds sensible to me. I've looked a bit more in depth how to do that and to be honest I did not find an easy way. Attributes and attribute groups are meant to be used with only one indirection level and making an additional one seems terribly more complex. Maybe I'm wrong, if you have a piece of code doing that please share it and I'll make my best to integrate it, otherwise I think I'll keep the simplest approach. > >> This is particularly relevant given the cell-name alone does not always > >> uniquely represent a cell on an nvmem device. > >> https://lore.kernel.org/lkml/ZLaZ7fzUSsa0Igx1@makrotopia.org/ > > > > It seems like this is gonna be fixed by suffixing @<offset> to the > > name, as anyway whatever solution we choose, it is gonna be needed. > > we have to be careful here not to break the nvmem_cell_get() users. I believe this only applies to sysfs names, so nvmem_cell_get() which uses real cells names should not be affected. Thanks, Miquèl
diff --git a/Documentation/ABI/testing/sysfs-nvmem-cells b/Documentation/ABI/testing/sysfs-nvmem-cells new file mode 100644 index 000000000000..b2d15a8d36e5 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-nvmem-cells @@ -0,0 +1,19 @@ +What: /sys/bus/nvmem/devices/.../cells/<cell-name> +Date: May 2023 +KernelVersion: 6.5 +Contact: Miquel Raynal <miquel.raynal@bootlin.com> +Description: + The "cells" folder contains one file per cell exposed by + the nvmem device. The name of the file is the cell name. + 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 + 00000000 54 4e 34 38 4d 2d 50 2d 44 4e |TN48M-P-DN| + 0000000a