[alsa-devel] [PATCH v7 12/13] slimbus: qcom: Add runtime-pm support using clock-pause
Charles Keepax
ckeepax at opensource.cirrus.com
Thu Nov 23 11:17:49 CET 2017
On Wed, Nov 15, 2017 at 02:10:42PM +0000, srinivas.kandagatla at linaro.org wrote:
> From: Sagar Dharia <sdharia at codeaurora.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 at codeaurora.org>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla at linaro.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?
Thanks,
Charles
> +
> + return ret;
> +}
More information about the Alsa-devel
mailing list