[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fac57b60-05b6-a546-bdd4-9e1d994cd74b@linaro.org>
Date: Fri, 24 Nov 2017 14:39:53 +0000
From: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To: Charles Keepax <ckeepax@...nsource.cirrus.com>
Cc: gregkh@...uxfoundation.org, broonie@...nel.org,
alsa-devel@...a-project.org, sdharia@...eaurora.org, bp@...e.de,
poeschel@...onage.de, treding@...dia.com, andreas.noever@...il.com,
alan@...ux.intel.com, mathieu.poirier@...aro.org, daniel@...ll.ch,
jkosina@...e.cz, sharon.dvir1@...l.huji.ac.il, joe@...ches.com,
davem@...emloft.net, james.hogan@...tec.com,
michael.opdenacker@...e-electrons.com, robh+dt@...nel.org,
pawel.moll@....com, mark.rutland@....com,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org, vinod.koul@...el.com, arnd@...db.de
Subject: Re: [PATCH v7 12/13] slimbus: qcom: Add runtime-pm support using
clock-pause
Thanks for the review,
On 23/11/17 10:17, Charles Keepax wrote:
> On Wed, Nov 15, 2017 at 02:10:42PM +0000, srinivas.kandagatla@...aro.org wrote:
>> From: Sagar Dharia <sdharia@...eaurora.org>
>>
>> Slimbus HW mandates that clock-pause sequence has to be executed
>> before disabling relevant interface and core clocks.
>> Runtime-PM's autosuspend feature is used here to enter/exit low
>> power mode for Qualcomm's Slimbus controller. Autosuspend feature
>> enables driver to avoid changing power-modes too frequently since
>> entering clock-pause is an expensive sequence
>>
>> Signed-off-by: Sagar Dharia <sdharia@...eaurora.org>
>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
>> ---
>> +
>> +#ifdef CONFIG_PM_SLEEP
>> +static int qcom_slim_suspend(struct device *dev)
>> +{
>> + int ret = 0;
>> +
>> + if (!pm_runtime_enabled(dev) ||
>> + (!pm_runtime_suspended(dev))) {
>> + dev_dbg(dev, "system suspend");
>> + ret = qcom_slim_runtime_suspend(dev);
>> + }
>> +
>> + /*
>> + * If the clock pause failed due to active channels, there is
>> + * a possibility that some audio stream is active during suspend.
>> + * (e.g. modem usecase during suspend)
>> + * We dont want to return suspend failure in that case so that
>> + * display and relevant components can still go to suspend.
>> + * If there is some other error, then it should prevent
>> + * system level suspend
>> + */
>> + if (ret == -EISCONN)
>> + ret = 0;
>
> Who actually returns the EISCONN for this to catch? Or will that
> be added to slim_ctrl_clk_pause once support for the audio
> channels is added?
This looks like a leftover code, I will remove it in next version and we
can add it once related code is added.
>
> Thanks,
> Charles
>
>> +
>> + return ret;
>> +}
Powered by blists - more mailing lists