Exposing NAND chip information
Tom Isaacson
Tom.Isaacson at navico.com
Mon Apr 16 19:51:20 EDT 2012
> I have the exact same requirement and cooked up a patch to do this for NAND:
> http://patchwork.ozlabs.org/patch/94407/
Ah, your patch shows you've added the sysfs files in mtdcore.c, which means they'll show up in:
/sys/class/mtd/..
The code I've done adds them in mxc_nd2.c (the device I have) so they appear in:
/sys/devices/platform/mxc_nandv2_flash.0/..
Obviously this only works for one type of flash right now, but I was thinking of extending all the separate uses of DEVICE_ATTR and manage_sysfs_files() to call back to a generic sysfs function in nand_base.c so these new parameters appear for all NAND devices.
I can't find anything online that gives a guide to where files should be added to sysfs - is there such a thing, or do people just make it up as they go along?
> however, to be complete it would also need to expose such informations for SPI
> and NOR flashes, which I have not done yet.
I don't have access to those devices so I can't test any code I might attempt.
Tom
More information about the linux-mtd
mailing list