From: Adrian Hunter <adrian.hunter@intel.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>,
linux-mmc@vger.kernel.org
Cc: Piotr Sroka <piotrs@cadence.com>, Hu Ziji <huziji@marvell.com>,
Christian Daudt <csd@broadcom.com>,
Scott Branden <sbranden@broadcom.com>,
Zhangfei Gao <zhangfei.gao@marvell.com>,
Kevin Hao <haokexin@gmail.com>, Olof Johansson <olof@lixom.net>,
linux-kernel@vger.kernel.org,
Ulf Hansson <ulf.hansson@linaro.org>
Subject: Re: [PATCH v4 4/4] mmc: sdhci-pltfm: export sdhci_pltfm_suspend/resume
Date: Mon, 28 Aug 2017 13:36:31 +0300 [thread overview]
Message-ID: <7b5561d0-d0d8-f542-5eee-faab891c5aef@intel.com> (raw)
In-Reply-To: <1503461703-16225-5-git-send-email-yamada.masahiro@socionext.com>
On 23/08/17 07:15, Masahiro Yamada wrote:
> This will be useful when drivers want to reuse either suspend or
> resume callback instead of whole of sdhci_pltfm_pmops.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
>
> Changes in v4: None
> Changes in v3: None
> Changes in v2: None
>
> drivers/mmc/host/sdhci-cadence.c | 20 +-------------------
> drivers/mmc/host/sdhci-pltfm.c | 6 ++++--
> drivers/mmc/host/sdhci-pltfm.h | 2 ++
> 3 files changed, 7 insertions(+), 21 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-cadence.c b/drivers/mmc/host/sdhci-cadence.c
> index 3dca3b3c6436..56529c3d389a 100644
> --- a/drivers/mmc/host/sdhci-cadence.c
> +++ b/drivers/mmc/host/sdhci-cadence.c
> @@ -391,24 +391,6 @@ static int sdhci_cdns_probe(struct platform_device *pdev)
> }
>
> #ifdef CONFIG_PM_SLEEP
> -static int sdhci_cdns_suspend(struct device *dev)
> -{
> - struct sdhci_host *host = dev_get_drvdata(dev);
> - struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
> - int ret;
> -
> - if (host->tuning_mode != SDHCI_TUNING_MODE_3)
> - mmc_retune_needed(host->mmc);
> -
> - ret = sdhci_suspend_host(host);
> - if (ret)
> - return ret;
> -
> - clk_disable_unprepare(pltfm_host->clk);
> -
> - return 0;
> -}
> -
> static int sdhci_cdns_resume(struct device *dev)
> {
> struct sdhci_host *host = dev_get_drvdata(dev);
> @@ -438,7 +420,7 @@ static int sdhci_cdns_resume(struct device *dev)
> #endif
>
> static const struct dev_pm_ops sdhci_cdns_pm_ops = {
> - SET_SYSTEM_SLEEP_PM_OPS(sdhci_cdns_suspend, sdhci_cdns_resume)
> + SET_SYSTEM_SLEEP_PM_OPS(sdhci_pltfm_suspend, sdhci_cdns_resume)
> };
>
> static const struct of_device_id sdhci_cdns_match[] = {
> diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
> index 4c0135e184e9..02bea6159d79 100644
> --- a/drivers/mmc/host/sdhci-pltfm.c
> +++ b/drivers/mmc/host/sdhci-pltfm.c
> @@ -209,7 +209,7 @@ int sdhci_pltfm_unregister(struct platform_device *pdev)
> EXPORT_SYMBOL_GPL(sdhci_pltfm_unregister);
>
> #ifdef CONFIG_PM_SLEEP
> -static int sdhci_pltfm_suspend(struct device *dev)
> +int sdhci_pltfm_suspend(struct device *dev)
> {
> struct sdhci_host *host = dev_get_drvdata(dev);
> struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
> @@ -226,8 +226,9 @@ static int sdhci_pltfm_suspend(struct device *dev)
>
> return 0;
> }
> +EXPORT_SYMBOL_GPL(sdhci_pltfm_suspend);
>
> -static int sdhci_pltfm_resume(struct device *dev)
> +int sdhci_pltfm_resume(struct device *dev)
> {
> struct sdhci_host *host = dev_get_drvdata(dev);
> struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
> @@ -243,6 +244,7 @@ static int sdhci_pltfm_resume(struct device *dev)
>
> return ret;
> }
> +EXPORT_SYMBOL_GPL(sdhci_pltfm_resume);
> #endif
>
> const struct dev_pm_ops sdhci_pltfm_pmops = {
> diff --git a/drivers/mmc/host/sdhci-pltfm.h b/drivers/mmc/host/sdhci-pltfm.h
> index 957839d0fe37..1e91fb1c020e 100644
> --- a/drivers/mmc/host/sdhci-pltfm.h
> +++ b/drivers/mmc/host/sdhci-pltfm.h
> @@ -109,6 +109,8 @@ static inline void *sdhci_pltfm_priv(struct sdhci_pltfm_host *host)
> return host->private;
> }
>
> +int sdhci_pltfm_suspend(struct device *dev);
> +int sdhci_pltfm_resume(struct device *dev);
> extern const struct dev_pm_ops sdhci_pltfm_pmops;
>
> #endif /* _DRIVERS_MMC_SDHCI_PLTFM_H */
>
next prev parent reply other threads:[~2017-08-28 10:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-23 4:14 [PATCH v4 0/4] mmc: sdhci: refactor PM in sdhci-pltfm add support PM for cadence port Masahiro Yamada
2017-08-23 4:15 ` [PATCH v4 1/4] mmc: sdhci-cadence: add suspend / resume support Masahiro Yamada
2017-08-28 10:11 ` Adrian Hunter
2017-08-23 4:15 ` [PATCH v4 2/4] mmc: sdhci-pxav2: switch to managed clk and sdhci_pltfm_unregister() Masahiro Yamada
2017-08-23 4:15 ` [PATCH v4 3/4] mmc: sdhci: enable/disable the clock in sdhci_pltfm_suspend/resume Masahiro Yamada
2017-08-28 10:34 ` Adrian Hunter
2017-08-28 15:35 ` Alan Cooper
2017-08-23 4:15 ` [PATCH v4 4/4] mmc: sdhci-pltfm: export sdhci_pltfm_suspend/resume Masahiro Yamada
2017-08-28 10:36 ` Adrian Hunter [this message]
2017-08-30 13:13 ` [PATCH v4 0/4] mmc: sdhci: refactor PM in sdhci-pltfm add support PM for cadence port Ulf Hansson
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=7b5561d0-d0d8-f542-5eee-faab891c5aef@intel.com \
--to=adrian.hunter@intel.com \
--cc=csd@broadcom.com \
--cc=haokexin@gmail.com \
--cc=huziji@marvell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=olof@lixom.net \
--cc=piotrs@cadence.com \
--cc=sbranden@broadcom.com \
--cc=ulf.hansson@linaro.org \
--cc=yamada.masahiro@socionext.com \
--cc=zhangfei.gao@marvell.com \
/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®