From: Florian Fainelli <ffainelli@freebox.fr>
To: Tom Isaacson <Tom.Isaacson@navico.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: Exposing NAND chip information
Date: Tue, 17 Apr 2012 11:39:28 +0200 [thread overview]
Message-ID: <4F8D3A50.5000203@freebox.fr> (raw)
In-Reply-To: <B36E81988B048A4FA3600EDE585F756BD0F7AC@EXCH02-AKLNZ.MARINE.NET.INT>
Hi Tom,
Le 04/17/12 01:51, Tom Isaacson a écrit :
>> 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/..
Yes, when I first asked what was the best place to add those attributes,
I initially wanted to create something like /sys/class/mtd/nand0 or such
and put attributes there, but Artem preferred having them in
/sys/class/mtd/mtd<N>/
> 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.
I do, it's just that I have been lazy on working again on this.
--
Florian
next prev parent reply other threads:[~2012-04-17 9:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-15 23:20 Exposing NAND chip information Tom Isaacson
2012-04-16 6:59 ` Florian Fainelli
2012-04-16 23:51 ` Tom Isaacson
2012-04-17 9:39 ` Florian Fainelli [this message]
2012-04-22 14:44 ` Artem Bityutskiy
2012-04-22 23:40 ` Tom Isaacson
2012-04-27 14:12 ` Artem Bityutskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F8D3A50.5000203@freebox.fr \
--to=ffainelli@freebox.fr \
--cc=Tom.Isaacson@navico.com \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).