From: Shawn Lin <shawn.lin@rock-chips.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
Shawn Lin <shawn.lin@rock-chips.com>
Subject: [PATCH 3/3] mmc: debugfs: implement ios show for driver type
Date: Tue, 22 Sep 2015 09:20:08 +0800 [thread overview]
Message-ID: <1442884808-11652-1-git-send-email-shawn.lin@rock-chips.com> (raw)
In-Reply-To: <1442884713-11193-1-git-send-email-shawn.lin@rock-chips.com>
This patch add ios->drv_type for mmc_ios_show to show the
card's driver type.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---
drivers/mmc/core/debugfs.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/drivers/mmc/core/debugfs.c b/drivers/mmc/core/debugfs.c
index 31155e8..5243e5f 100644
--- a/drivers/mmc/core/debugfs.c
+++ b/drivers/mmc/core/debugfs.c
@@ -172,6 +172,25 @@ static int mmc_ios_show(struct seq_file *s, void *data)
}
seq_printf(s, "signal voltage:\t%u (%s)\n", ios->chip_select, str);
+ switch (ios->drv_type) {
+ case MMC_SET_DRIVER_TYPE_A:
+ str = "driver type A";
+ break;
+ case MMC_SET_DRIVER_TYPE_B:
+ str = "driver type B";
+ break;
+ case MMC_SET_DRIVER_TYPE_C:
+ str = "driver type C";
+ break;
+ case MMC_SET_DRIVER_TYPE_D:
+ str = "driver type D";
+ break;
+ default:
+ str = "invalid";
+ break;
+ }
+ seq_printf(s, "driver type:\t%u (%s)\n", ios->drv_type, str);
+
return 0;
}
--
2.3.7
next prev parent reply other threads:[~2015-09-22 1:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-22 1:18 [PATCH 1/3] mmc: debugfs: fix memory leak for mmc_ext_csd_open Shawn Lin
2015-09-22 1:19 ` [PATCH 2/3] mmc: debugfs: implement ios show for SDR12 and SDR25 Shawn Lin
2015-09-23 19:33 ` Ulf Hansson
2015-09-22 1:20 ` Shawn Lin [this message]
2015-09-23 21:42 ` [PATCH 3/3] mmc: debugfs: implement ios show for driver type Ulf Hansson
[not found] ` <CAK7Sx+gO2=jhQ-DpNqm4o+JUqKv+38a1C9CtZ4sZrUQ5XGJqHQ@mail.gmail.com>
2015-09-22 1:37 ` [PATCH 1/3] mmc: debugfs: fix memory leak for mmc_ext_csd_open Shawn Lin
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=1442884808-11652-1-git-send-email-shawn.lin@rock-chips.com \
--to=shawn.lin@rock-chips.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.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
all inboxes | Powered by JetHome®