mmc: debugfs: implement ios show for driver type
authorShawn Lin <shawn.lin@rock-chips.com>
Tue, 22 Sep 2015 01:20:08 +0000 (09:20 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 26 Oct 2015 14:59:58 +0000 (15:59 +0100)
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>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/debugfs.c

index e9142108a6c6d486d3ac15ba4cb8a317d1fd62b2..9adba8d559805e2ebb02bae0f0a35b25b824201e 100644 (file)
@@ -166,6 +166,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;
 }