From: Artem Bityutskiy <dedekind@infradead.org>
To: Siddharth Choudhuri <siddh_c@yahoo.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [RFC] sysfs support for mtd
Date: Thu, 19 Jul 2007 10:02:52 +0300 [thread overview]
Message-ID: <1184828572.3531.183.camel@sauron> (raw)
In-Reply-To: <470958.35224.qm@web30213.mail.mud.yahoo.com>
On Wed, 2007-07-18 at 11:45 -0700, Siddharth Choudhuri wrote:
> Here's the design:
> o Each mtd partition appears as a directory under
> /sys/devices/mtd/
> o The following fields from struct mtd_info are
> exported as files - eccsize, ecctype, erasesize,
> numeraseregions, oobsize, size, type, writesize.
I doubt OOB-related stuff has to be exposed. We see many new flash
controllers which do not let you access OOB. It is better to avoid OOB
usage altogether, so I would not even exposed that stuff in sysfs.
> I would like to get some suggestions from the group
> before sending out a patch:
> o Currently the fields type, ecctype are integers.
> Should these be converted into appropriate strings as
> per #defines from mtd-abi.h
> Eg: cat /sys/devices/mtd/mtd0/type
> shows 4. Should this show MTD_NANDFLASH instead ?
I think yes, it should be something like "NAND", "OneNAND", "NOR",
"DataFlash", etc.
> o I am not sure where an additional link from bus to
> mtd should be added in the sysfs hierarchy. Should it
> be /sys/bus/platform/devices -> ../../../devices/mtd
> -OR-
> /sys/bus/platform/ -> ../../devices/mtd
No idea, but I've always thought sysfs core automatically puts these
links. All you have to do is to define your bus object which is
"platform" bus, and the stuff will appear. Although I am not sure.
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
next prev parent reply other threads:[~2007-07-19 7:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-18 18:45 [RFC] sysfs support for mtd Siddharth Choudhuri
2007-07-19 7:02 ` Artem Bityutskiy [this message]
2007-07-20 0:17 ` Siddharth Choudhuri
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=1184828572.3531.183.camel@sauron \
--to=dedekind@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=siddh_c@yahoo.com \
/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