From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 3/5] mmc: mediatek: Add PM support for MMC driver
Date: Mon, 20 Apr 2015 08:52:29 +0200 [thread overview]
Message-ID: <20150420065229.GP4946@pengutronix.de> (raw)
In-Reply-To: <1426562035-16709-4-git-send-email-chaotian.jing@mediatek.com>
On Tue, Mar 17, 2015 at 11:13:53AM +0800, Chaotian Jing wrote:
> Add PM support for Mediatek MMC driver
>
> Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com>
> ---
> drivers/mmc/host/mtk-sd.c | 94 ++++++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 93 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
> index 86c999b..e02f6a6 100644
> --- a/drivers/mmc/host/mtk-sd.c
> +++ b/drivers/mmc/host/mtk-sd.c
> @@ -1186,6 +1232,8 @@ static void msdc_ops_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
> int ret;
> u32 ddr = 0;
>
> + pm_runtime_get_sync(host->dev);
> +
> if (ios->timing == MMC_TIMING_UHS_DDR50)
> ddr = 1;
>
> @@ -1230,6 +1278,9 @@ static void msdc_ops_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
>
> if (host->mclk != ios->clock || host->ddr != ddr)
> msdc_set_mclk(host, ddr, ios->clock);
> +
> + pm_runtime_mark_last_busy(host->dev);
> + pm_runtime_put_autosuspend(host->dev);
This may also be imbalanced. This function can return between
pm_runtime_get_sync() and pm_runtime_put_autosuspend().
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-20 6:52 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
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 [this message]
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=20150420065229.GP4946@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).