ASoC: Intel: byt/cht: add .pm_ops
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tue, 26 May 2020 20:36:36 +0000 (15:36 -0500)
committerMark Brown <broonie@kernel.org>
Wed, 27 May 2020 13:06:56 +0000 (14:06 +0100)
Add required .pm_ops to support suspend/resume on baytrail/cherrytrail
machines.

This .pm_ops is conditionally-added to avoid impacting the legacy
driver where power management is handled differently.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20200526203640.25980-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/bytcht_cx2072x.c
sound/soc/intel/boards/bytcht_da7213.c
sound/soc/intel/boards/bytcht_es8316.c
sound/soc/intel/boards/bytcr_rt5640.c
sound/soc/intel/boards/bytcr_rt5651.c
sound/soc/intel/boards/cht_bsw_max98090_ti.c
sound/soc/intel/boards/cht_bsw_nau8824.c
sound/soc/intel/boards/cht_bsw_rt5645.c
sound/soc/intel/boards/cht_bsw_rt5672.c

index c7f81a9..fad9376 100644 (file)
@@ -261,6 +261,9 @@ static int snd_byt_cht_cx2072x_probe(struct platform_device *pdev)
 static struct platform_driver snd_byt_cht_cx2072x_driver = {
        .driver = {
                .name = "bytcht_cx2072x",
+#if IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL)
+               .pm = &snd_soc_pm_ops,
+#endif
        },
        .probe = snd_byt_cht_cx2072x_probe,
 };
index 5e96e7d..f3791ff 100644 (file)
@@ -272,6 +272,9 @@ static int bytcht_da7213_probe(struct platform_device *pdev)
 static struct platform_driver bytcht_da7213_driver = {
        .driver = {
                .name = "bytcht_da7213",
+#if IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL)
+               .pm = &snd_soc_pm_ops,
+#endif
        },
        .probe = bytcht_da7213_probe,
 };
index ddcd070..9e5fc94 100644 (file)
@@ -605,6 +605,9 @@ static int snd_byt_cht_es8316_mc_remove(struct platform_device *pdev)
 static struct platform_driver snd_byt_cht_es8316_mc_driver = {
        .driver = {
                .name = "bytcht_es8316",
+#if IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL)
+               .pm = &snd_soc_pm_ops,
+#endif
        },
        .probe = snd_byt_cht_es8316_mc_probe,
        .remove = snd_byt_cht_es8316_mc_remove,
index d7e42bd..30f70bb 100644 (file)
@@ -1319,6 +1319,9 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
 static struct platform_driver snd_byt_rt5640_mc_driver = {
        .driver = {
                .name = "bytcr_rt5640",
+#if IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL)
+               .pm = &snd_soc_pm_ops,
+#endif
        },
        .probe = snd_byt_rt5640_mc_probe,
 };
index 0468fc3..520e916 100644 (file)
@@ -1097,6 +1097,9 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
 static struct platform_driver snd_byt_rt5651_mc_driver = {
        .driver = {
                .name = "bytcr_rt5651",
+#if IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL)
+               .pm = &snd_soc_pm_ops,
+#endif
        },
        .probe = snd_byt_rt5651_mc_probe,
 };
index 1357017..767ac2a 100644 (file)
@@ -616,6 +616,9 @@ static int snd_cht_mc_remove(struct platform_device *pdev)
 static struct platform_driver snd_cht_mc_driver = {
        .driver = {
                .name = "cht-bsw-max98090",
+#if IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL)
+               .pm = &snd_soc_pm_ops,
+#endif
        },
        .probe = snd_cht_mc_probe,
        .remove = snd_cht_mc_remove,
index 67b46de..2f7c94d 100644 (file)
@@ -282,6 +282,9 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
 static struct platform_driver snd_cht_mc_driver = {
        .driver = {
                .name = "cht-bsw-nau8824",
+#if IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL)
+               .pm = &snd_soc_pm_ops,
+#endif
        },
        .probe = snd_cht_mc_probe,
 };
index e64eca5..22de138 100644 (file)
@@ -680,6 +680,9 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
 static struct platform_driver snd_cht_mc_driver = {
        .driver = {
                .name = "cht-bsw-rt5645",
+#if IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL)
+               .pm = &snd_soc_pm_ops,
+#endif
        },
        .probe = snd_cht_mc_probe,
 };
index 097023a..7a43c70 100644 (file)
@@ -459,6 +459,9 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
 static struct platform_driver snd_cht_mc_driver = {
        .driver = {
                .name = "cht-bsw-rt5672",
+#if IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL)
+               .pm = &snd_soc_pm_ops,
+#endif
        },
        .probe = snd_cht_mc_probe,
 };