mtd: mtdcore: add debugfs nodes for querying the flash name and id
authorZhuohao Lee <zhuohao@chromium.org>
Sun, 30 Jun 2019 16:07:10 +0000 (00:07 +0800)
committerTudor Ambarus <tudor.ambarus@microchip.com>
Thu, 29 Aug 2019 07:36:47 +0000 (10:36 +0300)
commit1018c94be6ea073115f6bcf993d6492138d2b8e3
tree95f2fc85c3b5bd0bdb8088d9be61edad62b68d0f
parent7ae2227b1c1928cfc8220ca6383c757b185fcf32
mtd: mtdcore: add debugfs nodes for querying the flash name and id

Currently, we don't have vfs nodes for querying the underlying flash name
and flash id. This information is important especially when we want to
know the flash detail of the defective system. In order to support the
query, we add mtd_debugfs_populate() to create two debugfs nodes
(ie. partname and partid). The upper driver can assign the pointer to
partname and partid before calling mtd_device_register().

Signed-off-by: Zhuohao Lee <zhuohao@chromium.org>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
drivers/mtd/mtdcore.c
include/linux/mtd/mtd.h