mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Harish Jenny K N <harish_kandiga@mentor.com>
To: Avri Altman <Avri.Altman@wdc.com>,
	"ulf.hansson@linaro.org" <ulf.hansson@linaro.org>,
	"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
	"adrian.hunter@intel.com" <adrian.hunter@intel.com>,
	"shawn.lin@rock-chips.com" <shawn.lin@rock-chips.com>,
	"andriy.shevchenko@linux.intel.com"
	<andriy.shevchenko@linux.intel.com>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Vladimir_Zapolskiy@mentor.com" <Vladimir_Zapolskiy@mentor.com>
Subject: Re: [PATCH v6] mmc: Export host capabilities to debugfs.
Date: Wed, 7 Mar 2018 12:34:07 +0530	[thread overview]
Message-ID: <af726c5a-edd4-94f9-7789-4527e9aff93d@mentor.com> (raw)
In-Reply-To: <DM5PR04MB10857D9F0177C760047100D1FCD80@DM5PR04MB1085.namprd04.prod.outlook.com>



On Wednesday 07 March 2018 12:10 PM, Avri Altman wrote:
>
>> -----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?

Something like this ?

#define YN(bit) ((caps & bit) ? "Yes" : "No")
and then call
seq_printf(s, "Can the host do 4 bit transfers :\t%s\n", YN(MMC_CAP_4_BIT_DATA));



Thanks,
Harish Jenny K N

  reply	other threads:[~2018-03-07  7:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-07  5:37 Harish Jenny K N
2018-03-07  6:40 ` Avri Altman
2018-03-07  7:04   ` Harish Jenny K N [this message]
2018-03-07 12:49     ` Andy Shevchenko

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=af726c5a-edd4-94f9-7789-4527e9aff93d@mentor.com \
    --to=harish_kandiga@mentor.com \
    --cc=Avri.Altman@wdc.com \
    --cc=Vladimir_Zapolskiy@mentor.com \
    --cc=adrian.hunter@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=shawn.lin@rock-chips.com \
    --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®