]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: Add per-card debugfs support
authorHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
Thu, 24 Jul 2008 12:18:58 +0000 (14:18 +0200)
committerPierre Ossman <drzeus@drzeus.cx>
Sat, 26 Jul 2008 23:26:17 +0000 (01:26 +0200)
commit87675cb396173fb375fe66afca6c3296a985ece7
tree9ad0b50fba46d24deb361a37a28141b12830b443
parent4f86a347aad8b6f14349564c86163d77391a1f39
mmc: Add per-card debugfs support

For each card successfully added to the bus, create a subdirectory under
the host's debugfs root with information about the card.

At the moment, only a single file is added to the card directory for
all cards: "state". It reflects the "state" field in struct mmc_card,
indicating whether the card is present, readonly, etc.

For MMC and SD cards (not SDIO), another file is added: "status".
Reading this file will ask the card about its current status and
return it. This can be useful if the card just refuses to respond to
any commands, which might indicate that the card state is not what the
MMC core thinks it is (due to a missing stop command, for example.)

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
drivers/mmc/core/bus.c
drivers/mmc/core/core.h
drivers/mmc/core/debugfs.c
include/linux/mmc/card.h