lkml.org 
[lkml]   [2018]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v6] mmc: Export host capabilities to debugfs.
Date


> -----Original Message-----
> From: Harish Jenny K N [mailto:harish_kandiga@mentor.com]
> Sent: Wednesday, March 07, 2018 7:38 AM
> To: ulf.hansson@linaro.org; linus.walleij@linaro.org;
> adrian.hunter@intel.com; shawn.lin@rock-chips.com; Avri Altman
> <Avri.Altman@wdc.com>; andriy.shevchenko@linux.intel.com
> Cc: linux-mmc@vger.kernel.org; linux-kernel@vger.kernel.org;
> harish_kandiga@mentor.com; Vladimir_Zapolskiy@mentor.com
> Subject: [PATCH v6] mmc: Export host capabilities to debugfs.
>
> This patch exports the host capabilities to debugfs
>
> This idea of sharing host capabilities over debugfs came up from Abbas Raza
> <Abbas_Raza@mentor.com> Earlier discussions:
> https://lkml.org/lkml/2018/3/5/357
> https://www.spinics.net/lists/linux-mmc/msg48219.html
>
> Signed-off-by: Harish Jenny K N <harish_kandiga@mentor.com>
> ---
>
>
> +static int mmc_caps_show(struct seq_file *s, void *unused) {
> + struct mmc_host *host = s->private;
> + u32 caps = host->caps;
> +
> + seq_puts(s, "\nMMC Host capabilities are:\n");
> + seq_puts(s,
> "=============================================\n");
> + seq_printf(s, "Can the host do 4 bit transfers :\t%s\n",
> + ((caps & MMC_CAP_4_BIT_DATA) ? "Yes" : "No"));

Maybe use a more compact form, and just call a macro with the applicable (stringified) bit?


Thanks,
Avri

\
 
 \ /
  Last update: 2018-03-07 07:40    [W:0.055 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site