From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/5] mmc: mediatek: Add Mediatek MMC driver
Date: Fri, 17 Apr 2015 11:12:13 +0200 [thread overview]
Message-ID: <20150417091213.GM4946@pengutronix.de> (raw)
In-Reply-To: <CAPDyKFoUg1snXeOwCiKPF_daxAAfcWE0nUbRAj23Z=k9z5FCyA@mail.gmail.com>
Ulf,
On Tue, Mar 31, 2015 at 02:23:06PM +0200, Ulf Hansson wrote:
> On 17 March 2015 at 04:13, Chaotian Jing <chaotian.jing@mediatek.com> wrote:
> > +
> > + msdc_set_buswidth(host, ios->bus_width);
> > +
> > + /* Suspend/Resume will do power off/on */
> > + switch (ios->power_mode) {
> > + case MMC_POWER_UP:
> > + msdc_init_hw(host);
> > + if (!IS_ERR(mmc->supply.vmmc)) {
> > + ret = mmc_regulator_set_ocr(mmc, mmc->supply.vmmc,
> > + ios->vdd);
> > + if (ret) {
> > + dev_err(host->dev, "Failed to set vmmc power!\n");
> > + return;
> > + }
> > + }
> > + break;
> > + case MMC_POWER_ON:
> > + if (!IS_ERR(mmc->supply.vqmmc)) {
> > + ret = regulator_enable(mmc->supply.vqmmc);
>
> The calls to regulator_enable|disable() for the vqmmc will not be
> balanced properly here. You need a local cache variable like
> "is_enabled" to keep track of this.
Shouldn't the MMC core provide balanced hooks for this? What about
MMC_POWER_UP, can this be used for enabling regulators?
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2015-04-17 9:12 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-17 3:13 [PATCH v2 0/5] Add Mediatek MMC driver Chaotian Jing
2015-03-17 3:13 ` [PATCH v2 1/5] mmc: dt-bindings: add Mediatek MMC bindings Chaotian Jing
2015-04-20 8:31 ` Sascha Hauer
2015-03-17 3:13 ` [PATCH v2 2/5] mmc: mediatek: Add Mediatek MMC driver Chaotian Jing
2015-03-31 12:23 ` Ulf Hansson
2015-04-03 7:22 ` 答复: " Chaotian Jing (井朝天)
[not found] ` <CAPDyKFrM94E8xXN_q0OqciOHC8WBC+fTOroSnnm+HDTOmWg6Gw@mail.gmail.com>
2015-04-10 3:17 ` chaotian.jing
2015-04-17 9:12 ` Sascha Hauer [this message]
2015-04-17 9:37 ` Ulf Hansson
2015-04-07 14:01 ` Matthias Brugger
2015-04-08 6:39 ` chaotian.jing
2015-04-17 13:45 ` Sascha Hauer
2015-04-19 3:22 ` chaotian.jing
2015-03-17 3:13 ` [PATCH v2 3/5] mmc: mediatek: Add PM support for " Chaotian Jing
2015-03-31 14:46 ` Ulf Hansson
2015-04-03 8:27 ` 答复: " Chaotian Jing (井朝天)
2015-04-20 6:49 ` Sascha Hauer
2015-04-20 6:52 ` Sascha Hauer
2015-03-17 3:13 ` [PATCH v2 4/5] arm64: mediatek: Add Mediatek MMC support in defconfig Chaotian Jing
2015-03-17 3:13 ` [PATCH v2 5/5] arm64: dts: mediatek: Add MT8173 MMC dts Chaotian Jing
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=20150417091213.GM4946@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).