summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorZidan Wang <zidan.wang@freescale.com>2015-09-18 11:09:11 +0800
committerNitin Garg <nitin.garg@nxp.com>2016-01-14 11:02:13 -0600
commit56fa5d58db90e4b58634126a862331d8aa641307 (patch)
treeb140359bb70d9c7cc276d187227d51a2dce34378 /sound
parent69127134c707ae60f2d72292373db9318caa7041 (diff)
ASoC: fsl_spdif: Add driver suspend and resume to support MEGA Fast
For i.MX6 SoloX, there is a mode of the SoC to shutdown all power source of modules during system suspend and resume procedure. Thus, SPDIF needs to save all the values of registers before the system suspend and restore them after the system resume. The SRPC register should be volatile, LOCK bit is set by the hardware. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit f9f4fa61aab9417e40898cf6706fffa94005dc44)
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/fsl/fsl_spdif.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c
index afee0f19e85e..1cf67d90870f 100644
--- a/sound/soc/fsl/fsl_spdif.c
+++ b/sound/soc/fsl/fsl_spdif.c
@@ -996,6 +996,14 @@ static const struct snd_soc_component_driver fsl_spdif_component = {
};
/* FSL SPDIF REGMAP */
+static const struct reg_default fsl_spdif_reg_defaults[] = {
+ {0x0, 0x00000400},
+ {0x4, 0x00000000},
+ {0xc, 0x00000000},
+ {0x34, 0x00000000},
+ {0x38, 0x00000000},
+ {0x50, 0x00020f00},
+};
static bool fsl_spdif_readable_reg(struct device *dev, unsigned int reg)
{
@@ -1039,7 +1047,6 @@ static bool fsl_spdif_volatile_reg(struct device *dev, unsigned int reg)
default:
return false;
}
-
}
static bool fsl_spdif_writeable_reg(struct device *dev, unsigned int reg)
@@ -1067,6 +1074,8 @@ static const struct regmap_config fsl_spdif_regmap_config = {
.val_bits = 32,
.max_register = REG_SPDIF_STC,
+ .reg_defaults = fsl_spdif_reg_defaults,
+ .num_reg_defaults = ARRAY_SIZE(fsl_spdif_reg_defaults),
.readable_reg = fsl_spdif_readable_reg,
.volatile_reg = fsl_spdif_volatile_reg,
.writeable_reg = fsl_spdif_writeable_reg,