summaryrefslogtreecommitdiff
path: root/sound/soc/tegra/tegra20_das.h
diff options
context:
space:
mode:
authorNikesh Oswal <noswal@nvidia.com>2011-12-13 15:10:28 +0530
committerVarun Wadekar <vwadekar@nvidia.com>2011-12-15 12:11:53 +0530
commitc7eca96f46f1162893f1031d406e22d2e20b061a (patch)
treee4b48cbea1c90cf2235f5b93f72823be03e51872 /sound/soc/tegra/tegra20_das.h
parente3794ce5d5d055f9e7939874297e0fe12e41e619 (diff)
asoc: tegra: restore i2s/das/spdif registers after suspend for t20
when system resumes from suspend state the i2s/das/spdif registers have power on reset values, this change restores the registers with their prior values from cache Bug: 904530 Change-Id: I35c14d95d2d6bf5bc116a1a80e21f4904c8969e5 Signed-off-by: Nikesh Oswal <noswal@nvidia.com> Reviewed-on: http://git-master/r/69715 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-by: Scott Peterson <speterson@nvidia.com>
Diffstat (limited to 'sound/soc/tegra/tegra20_das.h')
-rw-r--r--sound/soc/tegra/tegra20_das.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/tegra/tegra20_das.h b/sound/soc/tegra/tegra20_das.h
index 2fd731b70849..1d7c57fd0092 100644
--- a/sound/soc/tegra/tegra20_das.h
+++ b/sound/soc/tegra/tegra20_das.h
@@ -83,12 +83,23 @@
#define TEGRA20_DAS_DAC_ID_2 1
#define TEGRA20_DAS_DAC_ID_3 2
+#ifdef CONFIG_PM
+#define TEGRA20_DAS_CACHE_SIZE ((((TEGRA20_DAS_DAC_INPUT_DATA_CLK_SEL) + (TEGRA20_DAS_DAC_INPUT_DATA_CLK_SEL_STRIDE*TEGRA20_DAS_DAC_ID_3))>>2) + 1)
+#endif
+
struct tegra20_das {
struct device *dev;
void __iomem *regs;
struct dentry *debug;
+#ifdef CONFIG_PM
+ u32 reg_cache[TEGRA20_DAS_CACHE_SIZE];
+#endif
};
+#ifdef CONFIG_PM
+/* Restores the das registers from cache */
+extern int tegra20_das_resume();
+#endif
/*
* Terminology:
* DAS: Digital audio switch (HW module controlled by this driver)