Michael Walle
0a92de16b6
mtd: spi-nor: sysfs: print JEDEC ID for generic flash driver
...
We don't have a database entry for the generic SPI-NOR flash driver and
thus we don't have a JEDEC ID to print. Print the (cached) JEDEC ID
instead.
Signed-off-by: Michael Walle <michael@walle.cc >
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com >
Reviewed-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com >
Link: https://lore.kernel.org/r/20220810220654.1297699-8-michael@walle.cc
2022-11-21 15:37:16 +02:00
Michael Walle
0d9270f276
mtd: spi-nor: sysfs: hide manufacturer if it is not set
...
The manufacturer may be optional when pure SFDP flashes are supported.
Hide the sysfs property if no manufacturer is set.
Signed-off-by: Michael Walle <michael@walle.cc >
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com >
Reviewed-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com >
Link: https://lore.kernel.org/r/20220810220654.1297699-3-michael@walle.cc
2022-11-21 15:37:15 +02:00
Michael Walle
7d388551b6
mtd: spi-nor: hide jedec_id sysfs attribute if not present
...
Some non-jedec compliant flashes (like the Everspin flashes) don't have
an ID at all. Hide the attribute in this case.
Fixes: 36ac022862 ("mtd: spi-nor: add initial sysfs support")
Signed-off-by: Michael Walle <michael@walle.cc >
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com >
Reviewed-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com >
Link: https://lore.kernel.org/r/20220810220654.1297699-2-michael@walle.cc
2022-11-21 15:37:15 +02:00
Michael Walle
36ac022862
mtd: spi-nor: add initial sysfs support
...
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 >
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com >
Acked-by: Pratyush Yadav <p.yadav@ti.com >
2021-06-15 23:18:32 +05:30