diff --git a/sound/soc/tegra-alt/tegra210_admaif_alt.c b/sound/soc/tegra-alt/tegra210_admaif_alt.c index e53fa413..51f529d1 100644 --- a/sound/soc/tegra-alt/tegra210_admaif_alt.c +++ b/sound/soc/tegra-alt/tegra210_admaif_alt.c @@ -1,7 +1,7 @@ /* * tegra210_admaif_alt.c - Tegra ADMAIF driver * - * Copyright (c) 2014-2015 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2016 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, @@ -222,6 +222,7 @@ static int tegra210_admaif_runtime_suspend(struct device *dev) struct tegra210_admaif *admaif = dev_get_drvdata(dev); regcache_cache_only(admaif->regmap, true); + regcache_mark_dirty(admaif->regmap); pm_runtime_put_sync(dev->parent); return 0; @@ -247,11 +248,6 @@ static int tegra210_admaif_runtime_resume(struct device *dev) #ifdef CONFIG_PM_SLEEP static int tegra210_admaif_suspend(struct device *dev) { - struct tegra210_admaif *admaif = dev_get_drvdata(dev); - - if (admaif) - regcache_mark_dirty(admaif->regmap); - return 0; } #endif diff --git a/sound/soc/tegra-alt/tegra210_adx_alt.c b/sound/soc/tegra-alt/tegra210_adx_alt.c index 1b0701cb..468772f5 100644 --- a/sound/soc/tegra-alt/tegra210_adx_alt.c +++ b/sound/soc/tegra-alt/tegra210_adx_alt.c @@ -1,7 +1,7 @@ /* * tegra210_adx_alt.c - Tegra210 ADX driver * - * Copyright (c) 2014-2015 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2016 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, @@ -247,6 +247,7 @@ static int tegra210_adx_runtime_suspend(struct device *dev) struct tegra210_adx *adx = dev_get_drvdata(dev); regcache_cache_only(adx->regmap, true); + regcache_mark_dirty(adx->regmap); pm_runtime_put_sync(dev->parent); @@ -277,11 +278,6 @@ static int tegra210_adx_runtime_resume(struct device *dev) #ifdef CONFIG_PM_SLEEP static int tegra210_adx_suspend(struct device *dev) { - struct tegra210_adx *adx = dev_get_drvdata(dev); - - if (adx) - regcache_mark_dirty(adx->regmap); - return 0; } #endif diff --git a/sound/soc/tegra-alt/tegra210_afc_alt.c b/sound/soc/tegra-alt/tegra210_afc_alt.c index 411e136e..21f8ee8c 100644 --- a/sound/soc/tegra-alt/tegra210_afc_alt.c +++ b/sound/soc/tegra-alt/tegra210_afc_alt.c @@ -1,7 +1,7 @@ /* * tegra210_afc_alt.c - Tegra210 AFC driver * - * Copyright (c) 2014-2015 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2016 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, @@ -65,6 +65,7 @@ static int tegra210_afc_runtime_suspend(struct device *dev) struct tegra210_afc *afc = dev_get_drvdata(dev); regcache_cache_only(afc->regmap, true); + regcache_mark_dirty(afc->regmap); pm_runtime_put_sync(dev->parent); @@ -91,11 +92,6 @@ static int tegra210_afc_runtime_resume(struct device *dev) #ifdef CONFIG_PM_SLEEP static int tegra210_afc_suspend(struct device *dev) { - struct tegra210_afc *afc = dev_get_drvdata(dev); - - if (afc) - regcache_mark_dirty(afc->regmap); - return 0; } #endif diff --git a/sound/soc/tegra-alt/tegra210_amx_alt.c b/sound/soc/tegra-alt/tegra210_amx_alt.c index 5d03d73f..6f0fd624 100644 --- a/sound/soc/tegra-alt/tegra210_amx_alt.c +++ b/sound/soc/tegra-alt/tegra210_amx_alt.c @@ -1,7 +1,7 @@ /* * tegra210_amx_alt.c - Tegra210 AMX driver * - * Copyright (c) 2014-2015 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2016 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, @@ -241,6 +241,7 @@ static int tegra210_amx_runtime_suspend(struct device *dev) struct tegra210_amx *amx = dev_get_drvdata(dev); regcache_cache_only(amx->regmap, true); + regcache_mark_dirty(amx->regmap); pm_runtime_put_sync(dev->parent); @@ -304,11 +305,6 @@ static int tegra210_amx_runtime_resume(struct device *dev) #ifdef CONFIG_PM_SLEEP static int tegra210_amx_suspend(struct device *dev) { - struct tegra210_amx *amx = dev_get_drvdata(dev); - - if (amx) - regcache_mark_dirty(amx->regmap); - return 0; } #endif diff --git a/sound/soc/tegra-alt/tegra210_dmic_alt.c b/sound/soc/tegra-alt/tegra210_dmic_alt.c index 0ddf81e3..a7087f21 100644 --- a/sound/soc/tegra-alt/tegra210_dmic_alt.c +++ b/sound/soc/tegra-alt/tegra210_dmic_alt.c @@ -1,7 +1,7 @@ /* * tegra210_dmic_alt.c - Tegra210 DMIC driver * - * Copyright (c) 2014-2015 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2016 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, @@ -73,6 +73,7 @@ static int tegra210_dmic_runtime_suspend(struct device *dev) { struct tegra210_dmic *dmic = dev_get_drvdata(dev); regcache_cache_only(dmic->regmap, true); + regcache_mark_dirty(dmic->regmap); if (!(tegra_platform_is_unit_fpga() || tegra_platform_is_fpga())) clk_disable_unprepare(dmic->clk_dmic); @@ -110,11 +111,6 @@ static int tegra210_dmic_runtime_resume(struct device *dev) #ifdef CONFIG_PM_SLEEP static int tegra210_dmic_suspend(struct device *dev) { - struct tegra210_dmic *dmic = dev_get_drvdata(dev); - - if (dmic) - regcache_mark_dirty(dmic->regmap); - return 0; } #endif diff --git a/sound/soc/tegra-alt/tegra210_i2s_alt.c b/sound/soc/tegra-alt/tegra210_i2s_alt.c index 26c801f9..5c028007 100644 --- a/sound/soc/tegra-alt/tegra210_i2s_alt.c +++ b/sound/soc/tegra-alt/tegra210_i2s_alt.c @@ -1,7 +1,7 @@ /* * tegra210_i2s.c - Tegra210 I2S driver * - * Copyright (c) 2014-2015 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2016 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, @@ -260,6 +260,7 @@ static int tegra210_i2s_runtime_suspend(struct device *dev) } regcache_cache_only(i2s->regmap, true); + regcache_mark_dirty(i2s->regmap); clk_disable_unprepare(i2s->clk_i2s); } else @@ -312,11 +313,6 @@ static int tegra210_i2s_runtime_resume(struct device *dev) #ifdef CONFIG_PM_SLEEP static int tegra210_i2s_suspend(struct device *dev) { - struct tegra210_i2s *i2s = dev_get_drvdata(dev); - - if (i2s) - regcache_mark_dirty(i2s->regmap); - return 0; } #endif diff --git a/sound/soc/tegra-alt/tegra210_iqc_alt.c b/sound/soc/tegra-alt/tegra210_iqc_alt.c index e13e6c85..f6c63083 100644 --- a/sound/soc/tegra-alt/tegra210_iqc_alt.c +++ b/sound/soc/tegra-alt/tegra210_iqc_alt.c @@ -1,7 +1,7 @@ /* * tegra210_iqc.c - Tegra210 IQC driver * - * Copyright (c) 2014-2015 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2016 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, @@ -49,6 +49,7 @@ static int tegra210_iqc_runtime_suspend(struct device *dev) struct tegra210_iqc *iqc = dev_get_drvdata(dev); regcache_cache_only(iqc->regmap, true); + regcache_mark_dirty(iqc->regmap); #ifndef CONFIG_MACH_GRENADA clk_disable_unprepare(iqc->clk_iqc); @@ -86,11 +87,6 @@ static int tegra210_iqc_runtime_resume(struct device *dev) #ifdef CONFIG_PM_SLEEP static int tegra210_iqc_suspend(struct device *dev) { - struct tegra210_iqc *iqc = dev_get_drvdata(dev); - - if (iqc) - regcache_mark_dirty(iqc->regmap); - return 0; } #endif diff --git a/sound/soc/tegra-alt/tegra210_mixer_alt.c b/sound/soc/tegra-alt/tegra210_mixer_alt.c index 1ebc5e88..9dca99b9 100644 --- a/sound/soc/tegra-alt/tegra210_mixer_alt.c +++ b/sound/soc/tegra-alt/tegra210_mixer_alt.c @@ -1,7 +1,7 @@ /* * tegra210_mixer_alt.c - Tegra210 MIXER driver * - * Copyright (c) 2014-2015 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2016 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,6 +80,7 @@ static int tegra210_mixer_runtime_suspend(struct device *dev) struct tegra210_mixer *mixer = dev_get_drvdata(dev); regcache_cache_only(mixer->regmap, true); + regcache_mark_dirty(mixer->regmap); pm_runtime_put_sync(dev->parent); @@ -106,11 +107,6 @@ static int tegra210_mixer_runtime_resume(struct device *dev) #ifdef CONFIG_PM_SLEEP static int tegra210_mixer_suspend(struct device *dev) { - struct tegra210_mixer *mixer = dev_get_drvdata(dev); - - if (mixer) - regcache_mark_dirty(mixer->regmap); - return 0; } #endif diff --git a/sound/soc/tegra-alt/tegra210_ope_alt.c b/sound/soc/tegra-alt/tegra210_ope_alt.c index 6ab1c994..0b00c783 100644 --- a/sound/soc/tegra-alt/tegra210_ope_alt.c +++ b/sound/soc/tegra-alt/tegra210_ope_alt.c @@ -1,7 +1,7 @@ /* * tegra210_ope_alt.c - Tegra210 OPE driver * - * Copyright (c) 2014-2015 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2016 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, @@ -52,6 +52,9 @@ static int tegra210_ope_runtime_suspend(struct device *dev) regcache_cache_only(ope->mbdrc_regmap, true); regcache_cache_only(ope->peq_regmap, true); regcache_cache_only(ope->regmap, true); + regcache_mark_dirty(ope->regmap); + regcache_mark_dirty(ope->peq_regmap); + regcache_mark_dirty(ope->mbdrc_regmap); pm_runtime_put_sync(dev->parent); @@ -82,14 +85,6 @@ static int tegra210_ope_runtime_resume(struct device *dev) #ifdef CONFIG_PM_SLEEP static int tegra210_ope_suspend(struct device *dev) { - struct tegra210_ope *ope = dev_get_drvdata(dev); - - if (ope) { - regcache_mark_dirty(ope->regmap); - regcache_mark_dirty(ope->peq_regmap); - regcache_mark_dirty(ope->mbdrc_regmap); - } - return 0; } #endif diff --git a/sound/soc/tegra-alt/tegra210_sfc_alt.c b/sound/soc/tegra-alt/tegra210_sfc_alt.c index a01c6f04..6014fe37 100644 --- a/sound/soc/tegra-alt/tegra210_sfc_alt.c +++ b/sound/soc/tegra-alt/tegra210_sfc_alt.c @@ -1,7 +1,7 @@ /* * tegra210_sfc_alt.c - Tegra210 SFC driver * - * Copyright (c) 2014-2015 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2016 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, @@ -67,6 +67,7 @@ static int tegra210_sfc_runtime_suspend(struct device *dev) struct tegra210_sfc *sfc = dev_get_drvdata(dev); regcache_cache_only(sfc->regmap, true); + regcache_mark_dirty(sfc->regmap); pm_runtime_put_sync(dev->parent); @@ -93,11 +94,6 @@ static int tegra210_sfc_runtime_resume(struct device *dev) #ifdef CONFIG_PM_SLEEP static int tegra210_sfc_suspend(struct device *dev) { - struct tegra210_sfc *sfc = dev_get_drvdata(dev); - - if (sfc) - regcache_mark_dirty(sfc->regmap); - return 0; } #endif diff --git a/sound/soc/tegra-alt/tegra210_spdif_alt.c b/sound/soc/tegra-alt/tegra210_spdif_alt.c index 23fffd9a..c9dde1f8 100644 --- a/sound/soc/tegra-alt/tegra210_spdif_alt.c +++ b/sound/soc/tegra-alt/tegra210_spdif_alt.c @@ -61,6 +61,7 @@ static int tegra210_spdif_runtime_suspend(struct device *dev) struct tegra210_spdif *spdif = dev_get_drvdata(dev); regcache_cache_only(spdif->regmap, true); + regcache_mark_dirty(spdif->regmap); if (!(tegra_platform_is_unit_fpga() || tegra_platform_is_fpga())) { clk_disable_unprepare(spdif->clk_spdif_out); clk_disable_unprepare(spdif->clk_spdif_in); @@ -105,11 +106,6 @@ static int tegra210_spdif_runtime_resume(struct device *dev) #ifdef CONFIG_PM_SLEEP static int tegra210_spdif_suspend(struct device *dev) { - struct tegra210_spdif *spdif = dev_get_drvdata(dev); - - if (spdif) - regcache_mark_dirty(spdif->regmap); - return 0; } #endif diff --git a/sound/soc/tegra-alt/tegra210_xbar_alt.c b/sound/soc/tegra-alt/tegra210_xbar_alt.c index a1c25afc..34caedb3 100644 --- a/sound/soc/tegra-alt/tegra210_xbar_alt.c +++ b/sound/soc/tegra-alt/tegra210_xbar_alt.c @@ -1,7 +1,7 @@ /* * tegra210_xbar_alt.c - Tegra210 XBAR driver * - * Copyright (c) 2014-2015 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2016 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, @@ -58,6 +58,7 @@ static const struct regmap_config tegra210_xbar_regmap_config = { static int tegra210_xbar_runtime_suspend(struct device *dev) { regcache_cache_only(xbar->regmap, true); + regcache_mark_dirty(xbar->regmap); if (!(tegra_platform_is_unit_fpga() || tegra_platform_is_fpga())) { clk_disable_unprepare(xbar->clk); @@ -109,7 +110,6 @@ static int tegra210_xbar_child_suspend(struct device *dev, void *data) static int tegra210_xbar_suspend(struct device *dev) { - regcache_mark_dirty(xbar->regmap); device_for_each_child(dev, NULL, tegra210_xbar_child_suspend); return 0;