public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Alexander Schmidt <alexs@linux.vnet.ibm.com>
To: linux-mtd@lists.infradead.org
Cc: sid@ics.uci.edu
Subject: Re: [PATCH][MTD] CORE: sysfs support for mtd
Date: Fri, 27 Jul 2007 15:30:07 +0200	[thread overview]
Message-ID: <200707271530.08809.alexs@linux.vnet.ibm.com> (raw)
In-Reply-To: <1676.216.31.211.11.1185386926.squirrel@webmail.ics.uci.edu>

Hi Siddharth,

On Wednesday 25 July 2007, sid@ics.uci.edu wrote:
> 
> This patch adds sysfs support for mtd. It exports some of the members of the mtd_info structure
> into the user space via sysfs. The idea is to use sysfs as an alternative to using mtd ioctl(). 
> The following information from mtd_info struct [mtd.h] is exported as files:
> 
> - size              : Partition size
> - erasesize         : Size of erase block
> - writesize         : Page size
> - type              : On of the following -> Absent, RAM, ROM, NOR Flash, NAND Flash, Data flash
> - bbt               : List of bad blocks from device specific block_isbad() function
> - numeraseregions   : Number of erase regions
> 
> The master mtd partition appears as a directory under sysfs as /sys/devices/mtd. For each mtd
> partition (i.e., for each slave mtd found in mtdpart.c), a file under /sys/devices/mtd directory
> by name mtdN (N = partition number) is generated. A struct kobject kobj is added as member of
> struct mtd_info mtd [mtd.h] to enable mtd_info to become part of the kobjects hierarchy. The
> attributes to be exported are added as struct mtd_attr [mtdpart.c]. A soft link from
> /sys/bus/platform/devices/mtd points to /sys/deevices/mtd. Additional attributes can be added by
> adding an entry to the mtd_default_attrs[] structure [mtdpart.c]
> 
> It would be nice if the patch could be tested. I have tested it on a MIPS based board with NAND
> flash. (Please bear with me if the patch does not appear correctly. This is my first patch to the
> list and I have tested by sending the patch to myself as per the FAQs).

I have applied this patch to my tree and tried to compile it, but I get
lots of compile errors. Maybe you created it on an outdated kernel?!

/home/schmidta/git/ubi-2.6/drivers/mtd/mtdpart.c: In function `mtd_sysfs_rd_ecctype':
/home/schmidta/git/ubi-2.6/drivers/mtd/mtdpart.c:111: error: structure has no member named `ecctype'
/home/schmidta/git/ubi-2.6/drivers/mtd/mtdpart.c:112: error: `MTD_ECC_NONE' undeclared (first use in this function)
/home/schmidta/git/ubi-2.6/drivers/mtd/mtdpart.c:112: error: (Each undeclared identifier is reported only once
/home/schmidta/git/ubi-2.6/drivers/mtd/mtdpart.c:112: error: for each function it appears in.)
/home/schmidta/git/ubi-2.6/drivers/mtd/mtdpart.c:113: error: `MTD_ECC_RS_DiskOnChip' undeclared (first use in this function)
/home/schmidta/git/ubi-2.6/drivers/mtd/mtdpart.c:114: error: `MTD_ECC_SW' undeclared (first use in this function)
/home/schmidta/git/ubi-2.6/drivers/mtd/mtdpart.c:116: error: structure has no member named `ecctype'
/home/schmidta/git/ubi-2.6/drivers/mtd/mtdpart.c: In function `mtd_sysfs_rd_eccsize':
/home/schmidta/git/ubi-2.6/drivers/mtd/mtdpart.c:122: error: structure has no member named `eccsize'
/home/schmidta/git/ubi-2.6/drivers/mtd/mtdpart.c: In function `add_mtd_partitions':
/home/schmidta/git/ubi-2.6/drivers/mtd/mtdpart.c:510: warning: assignment from incompatible pointer type
/home/schmidta/git/ubi-2.6/drivers/mtd/mtdpart.c:511: error: invalid use of undefined type `struct subsystem'

Regards,
Alex

  parent reply	other threads:[~2007-07-27 13:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-25 18:08 [PATCH][MTD] CORE: sysfs support for mtd sid
2007-07-26  6:26 ` Artem Bityutskiy
2007-07-30 17:12   ` Siddharth Choudhuri
2007-08-04  9:05     ` Artem Bityutskiy
2007-07-27 13:30 ` Alexander Schmidt [this message]
2007-07-27 23:05   ` 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=200707271530.08809.alexs@linux.vnet.ibm.com \
    --to=alexs@linux.vnet.ibm.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=sid@ics.uci.edu \
    /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