diff options
author | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-07-24 14:18:57 +0200 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2008-07-27 01:26:16 +0200 |
commit | 6edd8ee60ac9b974bd6ec3b1bcb2aab02762fa8c (patch) | |
tree | 0f24dc879d9645935974489d152dd83815fcff68 /drivers/mmc/core/host.c | |
parent | c5d5e9c40fc6cabedd5fdc7441e6e9d37f5c9bba (diff) |
mmc: Export internal host state through debugfs
When CONFIG_DEBUG_FS is set, create a few files under /sys/kernel/debug
containing information about an mmc host's internal state. Currently,
just a single file is created, "ios", which contains information about
the current operating parameters for the bus (clock speed, bus width,
etc.)
Host drivers can add additional files and directories under the host's
root directory by passing the debugfs_root field in struct mmc_host as
the 'parent' parameter to debugfs_create_*.
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc/core/host.c')
-rw-r--r-- | drivers/mmc/core/host.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 1d795c5379b..6da80fd4d97 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -127,6 +127,10 @@ int mmc_add_host(struct mmc_host *host) if (err) return err; +#ifdef CONFIG_DEBUG_FS + mmc_add_host_debugfs(host); +#endif + mmc_start_host(host); return 0; @@ -146,6 +150,10 @@ void mmc_remove_host(struct mmc_host *host) { mmc_stop_host(host); +#ifdef CONFIG_DEBUG_FS + mmc_remove_host_debugfs(host); +#endif + device_del(&host->class_dev); led_trigger_unregister_simple(host->led); |