mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
ASoC: tegra-alt: remove redundant system sleep APIs
Late system sleep callbacks just invoke runtime PM calls if the device is not in the desired state. There is no need to have separate APIs for this, instead it can directly rely on pm_runtime_force_suspend/resume() APIs to achieve similar behavior. Another reason for this patch is, currently ACONNECT driver is using pm_runtime_force_*() to indirectly invoke runtime PM callbacks. Runtime suspend of ACONNECT fails complaining that there is an active child. Though all XBAR devices are runtime suspended, the runtime PM state of the corresponding device does not reflect it. Hence there is an error in __pm_runtime_set_status() for ACONNECT. This is seen when the audio playback is active and system tries to enter suspend. On system resume, audio fails to resume playback and kernel panic is seen. Hence current patch moves to pm_runtime_force_*() calls for system sleep for all XBAR devices. Bug 200509219 Bug 200503387 Change-Id: I5d531b0aa1a347686f7cca21fc40fe926b34f3a5 Signed-off-by: Sameer Pujar <spujar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2093331 Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Mohan Kumar D <mkumard@nvidia.com> Reviewed-by: Sharad Gupta <sharadg@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
@@ -103,24 +103,6 @@ static int tegra186_arad_runtime_resume(struct device *dev)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int tegra186_arad_suspend(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra186_arad_runtime_suspend(dev);
|
||||
}
|
||||
|
||||
static int tegra186_arad_resume(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra186_arad_runtime_resume(dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int tegra186_arad_codec_probe(struct snd_soc_codec *codec)
|
||||
{
|
||||
struct tegra186_arad *arad = snd_soc_codec_get_drvdata(codec);
|
||||
@@ -887,8 +869,8 @@ static int tegra186_arad_platform_remove(struct platform_device *pdev)
|
||||
static const struct dev_pm_ops tegra186_arad_pm_ops = {
|
||||
SET_RUNTIME_PM_OPS(tegra186_arad_runtime_suspend,
|
||||
tegra186_arad_runtime_resume, NULL)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(tegra186_arad_suspend,
|
||||
tegra186_arad_resume)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||
pm_runtime_force_resume)
|
||||
};
|
||||
|
||||
static struct platform_driver tegra186_arad_driver = {
|
||||
|
||||
@@ -226,24 +226,6 @@ static int tegra186_asrc_runtime_resume(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int tegra186_asrc_suspend(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra186_asrc_runtime_suspend(dev);
|
||||
}
|
||||
|
||||
static int tegra186_asrc_resume(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra186_asrc_runtime_resume(dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int tegra186_asrc_set_audio_cif(struct tegra186_asrc *asrc,
|
||||
struct snd_pcm_hw_params *params,
|
||||
unsigned int reg)
|
||||
@@ -1253,8 +1235,8 @@ static int tegra186_asrc_platform_remove(struct platform_device *pdev)
|
||||
static const struct dev_pm_ops tegra186_asrc_pm_ops = {
|
||||
SET_RUNTIME_PM_OPS(tegra186_asrc_runtime_suspend,
|
||||
tegra186_asrc_runtime_resume, NULL)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(tegra186_asrc_suspend,
|
||||
tegra186_asrc_resume)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||
pm_runtime_force_resume)
|
||||
};
|
||||
|
||||
static struct platform_driver tegra186_asrc_driver = {
|
||||
|
||||
@@ -124,24 +124,6 @@ static int tegra186_dspk_runtime_resume(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int tegra186_dspk_suspend(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra186_dspk_runtime_suspend(dev);
|
||||
}
|
||||
|
||||
static int tegra186_dspk_resume(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra186_dspk_runtime_resume(dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int tegra186_dspk_set_audio_cif(struct tegra186_dspk *dspk,
|
||||
struct snd_pcm_hw_params *params,
|
||||
unsigned int reg, struct snd_soc_dai *dai)
|
||||
@@ -656,8 +638,8 @@ static int tegra186_dspk_platform_remove(struct platform_device *pdev)
|
||||
static const struct dev_pm_ops tegra186_dspk_pm_ops = {
|
||||
SET_RUNTIME_PM_OPS(tegra186_dspk_runtime_suspend,
|
||||
tegra186_dspk_runtime_resume, NULL)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(tegra186_dspk_suspend,
|
||||
tegra186_dspk_resume)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||
pm_runtime_force_resume)
|
||||
};
|
||||
|
||||
static struct platform_driver tegra186_dspk_driver = {
|
||||
|
||||
@@ -300,24 +300,6 @@ static int tegra_admaif_runtime_resume(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int tegra_admaif_suspend(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra_admaif_runtime_suspend(dev);
|
||||
}
|
||||
|
||||
static int tegra_admaif_resume(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra_admaif_runtime_resume(dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int tegra_admaif_set_pack_mode(struct regmap *map, unsigned int reg,
|
||||
int valid_bit)
|
||||
{
|
||||
@@ -1397,7 +1379,8 @@ static int tegra_admaif_remove(struct platform_device *pdev)
|
||||
static const struct dev_pm_ops tegra_admaif_pm_ops = {
|
||||
SET_RUNTIME_PM_OPS(tegra_admaif_runtime_suspend,
|
||||
tegra_admaif_runtime_resume, NULL)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(tegra_admaif_suspend, tegra_admaif_resume)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||
pm_runtime_force_resume)
|
||||
};
|
||||
|
||||
static struct platform_driver tegra_admaif_driver = {
|
||||
|
||||
@@ -4770,23 +4770,11 @@ static void tegra210_adsp_audio_platform_shutdown(
|
||||
adsp->is_shutdown = true;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int tegra_adsp_pm_suspend(struct device *dev)
|
||||
{
|
||||
return pm_runtime_force_suspend(dev);
|
||||
}
|
||||
|
||||
static int tegra_adsp_pm_resume(struct device *dev)
|
||||
{
|
||||
return pm_runtime_force_resume(dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
static const struct dev_pm_ops tegra210_adsp_pm_ops = {
|
||||
SET_RUNTIME_PM_OPS(tegra210_adsp_runtime_suspend,
|
||||
tegra210_adsp_runtime_resume, NULL)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(tegra_adsp_pm_suspend,
|
||||
tegra_adsp_pm_resume)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||
pm_runtime_force_resume)
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -269,24 +269,6 @@ static int tegra210_adx_runtime_resume(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int tegra210_adx_suspend(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra210_adx_runtime_suspend(dev);
|
||||
}
|
||||
|
||||
static int tegra210_adx_resume(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra210_adx_runtime_resume(dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int tegra210_adx_set_audio_cif(struct snd_soc_dai *dai,
|
||||
int channels, int format,
|
||||
unsigned int reg)
|
||||
@@ -941,7 +923,8 @@ static int tegra210_adx_platform_remove(struct platform_device *pdev)
|
||||
static const struct dev_pm_ops tegra210_adx_pm_ops = {
|
||||
SET_RUNTIME_PM_OPS(tegra210_adx_runtime_suspend,
|
||||
tegra210_adx_runtime_resume, NULL)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(tegra210_adx_suspend, tegra210_adx_resume)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||
pm_runtime_force_resume)
|
||||
};
|
||||
|
||||
static struct platform_driver tegra210_adx_driver = {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* tegra210_afc_alt.c - Tegra210 AFC driver
|
||||
*
|
||||
* Copyright (c) 2014-2017 NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2014-2019 NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -88,24 +88,6 @@ static int tegra210_afc_runtime_resume(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int tegra210_afc_suspend(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra210_afc_runtime_suspend(dev);
|
||||
}
|
||||
|
||||
static int tegra210_afc_resume(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra210_afc_runtime_resume(dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int tegra210_afc_controls_get(struct snd_kcontrol *kctl,
|
||||
struct snd_ctl_elem_value *uctl)
|
||||
{
|
||||
@@ -659,7 +641,8 @@ static int tegra210_afc_platform_remove(struct platform_device *pdev)
|
||||
static const struct dev_pm_ops tegra210_afc_pm_ops = {
|
||||
SET_RUNTIME_PM_OPS(tegra210_afc_runtime_suspend,
|
||||
tegra210_afc_runtime_resume, NULL)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(tegra210_afc_suspend, tegra210_afc_resume)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||
pm_runtime_force_resume)
|
||||
};
|
||||
|
||||
static struct platform_driver tegra210_afc_driver = {
|
||||
|
||||
@@ -296,24 +296,6 @@ static int tegra210_amx_runtime_resume(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int tegra210_amx_suspend(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra210_amx_runtime_suspend(dev);
|
||||
}
|
||||
|
||||
static int tegra210_amx_resume(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra210_amx_runtime_resume(dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int tegra210_amx_set_audio_cif(struct snd_soc_dai *dai,
|
||||
struct snd_pcm_hw_params *params,
|
||||
unsigned int reg)
|
||||
@@ -1028,7 +1010,8 @@ static int tegra210_amx_platform_remove(struct platform_device *pdev)
|
||||
static const struct dev_pm_ops tegra210_amx_pm_ops = {
|
||||
SET_RUNTIME_PM_OPS(tegra210_amx_runtime_suspend,
|
||||
tegra210_amx_runtime_resume, NULL)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(tegra210_amx_suspend, tegra210_amx_resume)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||
pm_runtime_force_resume)
|
||||
};
|
||||
|
||||
static struct platform_driver tegra210_amx_driver = {
|
||||
|
||||
@@ -106,24 +106,6 @@ static int tegra210_dmic_runtime_resume(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int tegra210_dmic_suspend(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra210_dmic_runtime_suspend(dev);
|
||||
}
|
||||
|
||||
static int tegra210_dmic_resume(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra210_dmic_runtime_resume(dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int tegra210_dmic_set_dai_bclk_ratio(struct snd_soc_dai *dai,
|
||||
unsigned int ratio)
|
||||
{
|
||||
@@ -875,8 +857,8 @@ static int tegra210_dmic_platform_remove(struct platform_device *pdev)
|
||||
static const struct dev_pm_ops tegra210_dmic_pm_ops = {
|
||||
SET_RUNTIME_PM_OPS(tegra210_dmic_runtime_suspend,
|
||||
tegra210_dmic_runtime_resume, NULL)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(tegra210_dmic_suspend,
|
||||
tegra210_dmic_resume)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||
pm_runtime_force_resume)
|
||||
};
|
||||
|
||||
static struct platform_driver tegra210_dmic_driver = {
|
||||
|
||||
@@ -250,24 +250,6 @@ static int tegra210_i2s_runtime_resume(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int tegra210_i2s_suspend(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra210_i2s_runtime_suspend(dev);
|
||||
}
|
||||
|
||||
static int tegra210_i2s_resume(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra210_i2s_runtime_resume(dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void tegra210_i2s_set_data_offset(struct tegra210_i2s *i2s,
|
||||
unsigned int data_offset)
|
||||
{
|
||||
@@ -1293,7 +1275,8 @@ static int tegra210_i2s_platform_remove(struct platform_device *pdev)
|
||||
static const struct dev_pm_ops tegra210_i2s_pm_ops = {
|
||||
SET_RUNTIME_PM_OPS(tegra210_i2s_runtime_suspend,
|
||||
tegra210_i2s_runtime_resume, NULL)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(tegra210_i2s_suspend, tegra210_i2s_resume)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||
pm_runtime_force_resume)
|
||||
};
|
||||
|
||||
static struct platform_driver tegra210_i2s_driver = {
|
||||
|
||||
@@ -78,24 +78,6 @@ static int tegra210_iqc_runtime_resume(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int tegra210_iqc_suspend(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra210_iqc_runtime_suspend(dev);
|
||||
}
|
||||
|
||||
static int tegra210_iqc_resume(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra210_iqc_runtime_resume(dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int tegra210_iqc_set_audio_cif(struct tegra210_iqc *iqc,
|
||||
struct snd_pcm_hw_params *params,
|
||||
unsigned int reg)
|
||||
@@ -456,7 +438,8 @@ static int tegra210_iqc_platform_remove(struct platform_device *pdev)
|
||||
static const struct dev_pm_ops tegra210_iqc_pm_ops = {
|
||||
SET_RUNTIME_PM_OPS(tegra210_iqc_runtime_suspend,
|
||||
tegra210_iqc_runtime_resume, NULL)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(tegra210_iqc_suspend, tegra210_iqc_resume)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||
pm_runtime_force_resume)
|
||||
};
|
||||
|
||||
static struct platform_driver tegra210_iqc_driver = {
|
||||
|
||||
@@ -97,24 +97,6 @@ static int tegra210_mixer_runtime_resume(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int tegra210_mixer_suspend(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra210_mixer_runtime_suspend(dev);
|
||||
}
|
||||
|
||||
static int tegra210_mixer_resume(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra210_mixer_runtime_resume(dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int tegra210_mixer_write_ram(struct tegra210_mixer *mixer,
|
||||
unsigned int addr,
|
||||
unsigned int val)
|
||||
@@ -842,8 +824,8 @@ static int tegra210_mixer_platform_remove(struct platform_device *pdev)
|
||||
static const struct dev_pm_ops tegra210_mixer_pm_ops = {
|
||||
SET_RUNTIME_PM_OPS(tegra210_mixer_runtime_suspend,
|
||||
tegra210_mixer_runtime_resume, NULL)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(tegra210_mixer_suspend,
|
||||
tegra210_mixer_resume)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||
pm_runtime_force_resume)
|
||||
};
|
||||
|
||||
static struct platform_driver tegra210_mixer_driver = {
|
||||
|
||||
@@ -81,24 +81,6 @@ static int tegra210_mvc_runtime_resume(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int tegra210_mvc_suspend(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra210_mvc_runtime_suspend(dev);
|
||||
}
|
||||
|
||||
static int tegra210_mvc_resume(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra210_mvc_runtime_resume(dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int tegra210_mvc_write_ram(struct tegra210_mvc *mvc,
|
||||
unsigned int addr,
|
||||
unsigned int val)
|
||||
@@ -779,7 +761,8 @@ static int tegra210_mvc_platform_remove(struct platform_device *pdev)
|
||||
static const struct dev_pm_ops tegra210_mvc_pm_ops = {
|
||||
SET_RUNTIME_PM_OPS(tegra210_mvc_runtime_suspend,
|
||||
tegra210_mvc_runtime_resume, NULL)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(tegra210_mvc_suspend, tegra210_mvc_resume)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||
pm_runtime_force_resume)
|
||||
};
|
||||
|
||||
static struct platform_driver tegra210_mvc_driver = {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* tegra210_ope_alt.c - Tegra210 OPE driver
|
||||
*
|
||||
* Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2014-2019, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -80,24 +80,6 @@ static int tegra210_ope_runtime_resume(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int tegra210_ope_suspend(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra210_ope_runtime_suspend(dev);
|
||||
}
|
||||
|
||||
static int tegra210_ope_resume(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra210_ope_runtime_resume(dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int tegra210_ope_set_audio_cif(struct tegra210_ope *ope,
|
||||
struct snd_pcm_hw_params *params,
|
||||
unsigned int reg)
|
||||
@@ -484,7 +466,8 @@ static int tegra210_ope_platform_remove(struct platform_device *pdev)
|
||||
static const struct dev_pm_ops tegra210_ope_pm_ops = {
|
||||
SET_RUNTIME_PM_OPS(tegra210_ope_runtime_suspend,
|
||||
tegra210_ope_runtime_resume, NULL)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(tegra210_ope_suspend, tegra210_ope_resume)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||
pm_runtime_force_resume)
|
||||
};
|
||||
|
||||
static struct platform_driver tegra210_ope_driver = {
|
||||
|
||||
@@ -84,24 +84,6 @@ static int tegra210_sfc_runtime_resume(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int tegra210_sfc_suspend(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra210_sfc_runtime_suspend(dev);
|
||||
}
|
||||
|
||||
static int tegra210_sfc_resume(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra210_sfc_runtime_resume(dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int tegra210_sfc_set_dai_sysclk(struct snd_soc_dai *dai,
|
||||
int clk_id, unsigned int freq, int dir)
|
||||
{
|
||||
@@ -988,7 +970,8 @@ static int tegra210_sfc_platform_remove(struct platform_device *pdev)
|
||||
static const struct dev_pm_ops tegra210_sfc_pm_ops = {
|
||||
SET_RUNTIME_PM_OPS(tegra210_sfc_runtime_suspend,
|
||||
tegra210_sfc_runtime_resume, NULL)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(tegra210_sfc_suspend, tegra210_sfc_resume)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||
pm_runtime_force_resume)
|
||||
};
|
||||
|
||||
static struct platform_driver tegra210_sfc_driver = {
|
||||
|
||||
@@ -115,24 +115,6 @@ static int tegra210_spdif_runtime_resume(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int tegra210_spdif_suspend(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra210_spdif_runtime_suspend(dev);
|
||||
}
|
||||
|
||||
static int tegra210_spdif_resume(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra210_spdif_runtime_resume(dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int tegra210_spdif_set_dai_sysclk(struct snd_soc_dai *dai,
|
||||
int clk_id, unsigned int freq, int dir)
|
||||
{
|
||||
@@ -638,8 +620,8 @@ static int tegra210_spdif_platform_remove(struct platform_device *pdev)
|
||||
static const struct dev_pm_ops tegra210_spdif_pm_ops = {
|
||||
SET_RUNTIME_PM_OPS(tegra210_spdif_runtime_suspend,
|
||||
tegra210_spdif_runtime_resume, NULL)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(tegra210_spdif_suspend,
|
||||
tegra210_spdif_resume)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||
pm_runtime_force_resume)
|
||||
};
|
||||
|
||||
static struct platform_driver tegra210_spdif_driver = {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* tegra210_xbar_alt.c - Tegra210 XBAR driver
|
||||
*
|
||||
* Copyright (c) 2014-2017 NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2014-2019 NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -1415,7 +1415,8 @@ err:
|
||||
static const struct dev_pm_ops tegra_xbar_pm_ops = {
|
||||
SET_RUNTIME_PM_OPS(tegra_xbar_runtime_suspend,
|
||||
tegra_xbar_runtime_resume, NULL)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(tegra_xbar_suspend, tegra_xbar_resume)
|
||||
SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||
pm_runtime_force_resume)
|
||||
};
|
||||
|
||||
static struct platform_driver tegra_xbar_driver = {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* tegra210_xbar_utils_alt.c - Tegra XBAR driver utils
|
||||
*
|
||||
* Copyright (c) 2017-2018 NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2017-2019 NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -293,26 +293,6 @@ int tegra_xbar_runtime_resume(struct device *dev)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(tegra_xbar_runtime_resume);
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
int tegra_xbar_suspend(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra_xbar_runtime_suspend(dev);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(tegra_xbar_suspend);
|
||||
|
||||
int tegra_xbar_resume(struct device *dev)
|
||||
{
|
||||
if (pm_runtime_status_suspended(dev))
|
||||
return 0;
|
||||
|
||||
return tegra_xbar_runtime_resume(dev);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(tegra_xbar_resume);
|
||||
#endif
|
||||
|
||||
void tegra_xbar_shutdown(struct platform_device *pdev)
|
||||
{
|
||||
xbar->is_shutdown = true;
|
||||
|
||||
Reference in New Issue
Block a user