On 06/30/2019 07:07 PM, Zhuohao Lee wrote: > External E-Mail > > > 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@xxxxxxxxxxxx> > Reviewed-by: Boris Brezillon <boris.brezillon@xxxxxxxxxxxxx> > --- > Changes in V8: > - Change pr_debug/pr_err to dev_dbg/dev_err respectively > - Previous discussion: https://patchwork.ozlabs.org/patch/1109227/ > Changes in V7: > - Remove unused check for partname/partid > - Previous discussion: https://patchwork.ozlabs.org/patch/1109200/ > Changes in V6: > - Create the debugfs only when the partname/partid is not NULL > - Previous discussion: https://patchwork.ozlabs.org/patch/1109041/ > Changes in V5: > - Move debugfs_create_dir() to mtd_debugfs_populate() > - Previous discussion: https://patchwork.ozlabs.org/patch/1107810/ > Changes in V4: > - Separate the change to two patches. The first patch is adding the general > handling for the partname and partid in the mtdcore.c. The second patch > is enabling the two debugfs nodes for spi-nor. > - Previous discussion: https://patchwork.ozlabs.org/patch/1097377/ > Changes in v3: > - Add partname and partid to mtd.h and create debugfs inside mtdcore.c > - Previous discussion: https://patchwork.ozlabs.org/patch/1095731/ > Changes in v2: > - Change to use debugfs to output flash name and id > - Previous discussion: https://patchwork.ozlabs.org/patch/1067763/ > --- > drivers/mtd/mtdcore.c | 85 ++++++++++++++++++++++++++++++++++++----- > include/linux/mtd/mtd.h | 3 ++ > 2 files changed, 79 insertions(+), 9 deletions(-) > Fixed checkpatch warnings and checks and Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git, spi-nor/next branch. Thanks, ta ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/