Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1505459

Re: [PATCH v4] mmc: sdhci-msm: Add pm_runtime and system PM support

From Pramod Gurav <pramod.gurav@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH v4] mmc: sdhci-msm: Add pm_runtime and system PM support
Date 2016-10-21 06:20 +0200
Message-ID <suztf-x1-3@gated-at.bofh.it> (permalink)
References <stzEZ-io-5@gated-at.bofh.it> <sulgB-7Ys-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Thanks Georgi for the review.

On 20 October 2016 at 18:38, Georgi Djakov <georgi.djakov@linaro.org> wrote:
> Hi Pramod,
>
> Thanks for the patch!
>
> On 10/18/2016 01:16 PM, Pramod Gurav wrote:
>>
>> Provides runtime PM callbacks to enable and disable clock resources
>> when idle. Also support system PM callbacks to be called during system
>> suspend and resume.
>>
>> Signed-off-by: Pramod Gurav <pramod.gurav@linaro.org>
>> ---
>>
>> Tested on DB410C.
>>
>
> [..]
>
>> +static int sdhci_msm_runtime_resume(struct device *dev)
>> +{
>> +       struct sdhci_host *host = dev_get_drvdata(dev);
>> +       struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
>> +       struct sdhci_msm_host *msm_host = sdhci_pltfm_priv(pltfm_host);
>> +       int ret;
>> +
>> +       ret = clk_prepare_enable(msm_host->clk);
>> +       if (ret) {
>> +               dev_err(dev, "clk_enable failed: %d\n", ret);
>> +               return ret;
>> +       }
>> +       ret = clk_prepare_enable(msm_host->pclk);
>> +       if (ret) {
>> +               dev_err(dev, "clk_enable failed: %d\n", ret);
>
>
> Nit: Maybe mention in the prints which clock failed - core or peripheral.

Agree. Will add in v5.

>
>> +               clk_disable_unprepare(msm_host->clk);
>> +               return ret;
>> +       }
>> +
>> +       return 0;
>> +}
>> +#endif
>> +
>> +static const struct dev_pm_ops sdhci_msm_pm_ops = {
>> +       SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
>> +                                       pm_runtime_force_resume)
>
>
> Nit: Please align with the parenthesis.
>
>> +       SET_RUNTIME_PM_OPS(sdhci_msm_runtime_suspend,
>> sdhci_msm_runtime_resume,
>> +                               NULL)
>
>
> Ditto.
Yes. Will take care of this as well.
>
> Reviewed-by: Georgi Djakov <georgi.djakov@linaro.org>

Thanks again. :)
>
> BR,
> Georgi

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4] mmc: sdhci-msm: Add pm_runtime and system PM support Pramod Gurav <pramod.gurav@linaro.org> - 2016-10-18 12:20 +0200
  Re: [PATCH v4] mmc: sdhci-msm: Add pm_runtime and system PM support Georgi Djakov <georgi.djakov@linaro.org> - 2016-10-20 15:10 +0200
    Re: [PATCH v4] mmc: sdhci-msm: Add pm_runtime and system PM support Pramod Gurav <pramod.gurav@linaro.org> - 2016-10-21 06:20 +0200
  Re: [PATCH v4] mmc: sdhci-msm: Add pm_runtime and system PM support Ritesh Harjani <riteshh@codeaurora.org> - 2016-10-20 17:00 +0200
    Re: [PATCH v4] mmc: sdhci-msm: Add pm_runtime and system PM support Pramod Gurav <pramod.gurav@linaro.org> - 2016-10-21 06:30 +0200

csiph-web