public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>
Subject: Re: [PATCH v3] sdhci: Advertise 2.0v supply on SDIO host interface
Date: Wed, 10 Jan 2018 20:04:41 +0200	[thread overview]
Message-ID: <1515607481.7000.885.camel@linux.intel.com> (raw)
In-Reply-To: <CAPDyKFoRDhx9VzyUjxK=5u+JLcBait29hLozbhX_B9Zov61COA@mail.gmail.com>

On Wed, 2018-01-10 at 18:01 +0100, Ulf Hansson wrote:
> On 10 January 2018 at 16:32, Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > On Intel Edison the Broadcom WiFi card, which is connected to SDIO,
> > requires 2.0v, while the host, according to Intel Merrifield TRM,
> > supports 1.8v supply only.

> > +       /*
> > +        * Without a regulator, SDHCI does not support 2.0v but we
> > get
> > +        * here because we advertised 2.0v support for compatibility
> > +        * with the SDIO card's OCR. Map it to 1.8v for the purpose
> > of
> > +        * turning on the power.
> > +        */
> > +       if (IS_ERR(host->mmc->supply.vmmc) && vdd ==
> > ilog2(MMC_VDD_20_21))
> > +               vdd = ilog2(MMC_VDD_165_195);
> 
> Why not instead extend the range in sdhci_set_power_noreg() to also
> check for MMC_VDD_20_21?
> 
> Or is there a problem with that?

Do we have any grounds to do this in generic code?

Moreover, if we check for 2.0v what should we do in generic code?
For my understanding

case _20_21:
 pwr = _180;

is absolutely wrong in generic code (see how it looked in v1 of this
patch).

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

  reply	other threads:[~2018-01-10 18:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-10 15:32 [PATCH v3] sdhci: Advertise 2.0v supply on SDIO host interface Andy Shevchenko
2018-01-10 17:01 ` Ulf Hansson
2018-01-10 18:04   ` Andy Shevchenko [this message]
2018-01-10 20:06     ` Ulf Hansson
2018-01-10 20:16       ` Andy Shevchenko
2018-01-11  7:57       ` Adrian Hunter
2018-01-11 12:48         ` 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=1515607481.7000.885.camel@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=adrian.hunter@intel.com \
    --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