lkml.org 
[lkml]   [2021]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 2/2] mtd: spi-nor: add initial sysfs support
On Thu, Apr 29, 2021 at 8:57 AM Michael Walle <michael@walle.cc> wrote:
>
> Add support to show the manufacturer, the partname and JEDEC identifier
> as well as to dump the SFDP table. Not all flashes list their SFDP table
> contents in their datasheet. So having that is useful. It might also be
> helpful in bug reports from users.
>
> Signed-off-by: Michael Walle <michael@walle.cc>
> ---
> Pratyush, Heiko, I've dropped your Acked and Tested-by because there
> were some changes.
>
> .../ABI/testing/sysfs-bus-spi-devices-spi-nor | 31 +++++++
> drivers/mtd/spi-nor/Makefile | 2 +-
> drivers/mtd/spi-nor/core.c | 1 +
> drivers/mtd/spi-nor/core.h | 2 +
> drivers/mtd/spi-nor/sysfs.c | 92 +++++++++++++++++++
> 5 files changed, 127 insertions(+), 1 deletion(-)
> create mode 100644 Documentation/ABI/testing/sysfs-bus-spi-devices-spi-nor
> create mode 100644 drivers/mtd/spi-nor/sysfs.c
>
> diff --git a/Documentation/ABI/testing/sysfs-bus-spi-devices-spi-nor b/Documentation/ABI/testing/sysfs-bus-spi-devices-spi-nor
> new file mode 100644
> index 000000000000..4c88307759e2
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-bus-spi-devices-spi-nor
> @@ -0,0 +1,31 @@
> +What: /sys/bus/spi/devices/.../jedec_id

Since mtd/spi-nor doesn't own this device (belongs to the spi subsystem), should
we put its attributes under a named subdirectory? Perhaps something like
/sys/bus/spi/devices/.../spi_nor/jedec_id ?

I'm just thinking about avoiding any potential for namespace clashes.
- Alex

\
 
 \ /
  Last update: 2021-04-29 23:35    [W:0.054 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site