aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/tegra/tegra30_i2s.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c
index 31d092d83c71..bd0ebc09c8be 100644
--- a/sound/soc/tegra/tegra30_i2s.c
+++ b/sound/soc/tegra/tegra30_i2s.c
@@ -514,6 +514,24 @@ static int tegra30_i2s_platform_remove(struct platform_device *pdev)
514 return 0; 514 return 0;
515} 515}
516 516
517#ifdef CONFIG_PM_SLEEP
518static int tegra30_i2s_suspend(struct device *dev)
519{
520 struct tegra30_i2s *i2s = dev_get_drvdata(dev);
521
522 regcache_mark_dirty(i2s->regmap);
523
524 return 0;
525}
526
527static int tegra30_i2s_resume(struct device *dev)
528{
529 struct tegra30_i2s *i2s = dev_get_drvdata(dev);
530
531 return regcache_sync(i2s->regmap);
532}
533#endif
534
517static const struct of_device_id tegra30_i2s_of_match[] = { 535static const struct of_device_id tegra30_i2s_of_match[] = {
518 { .compatible = "nvidia,tegra30-i2s", }, 536 { .compatible = "nvidia,tegra30-i2s", },
519 {}, 537 {},
@@ -522,6 +540,7 @@ static const struct of_device_id tegra30_i2s_of_match[] = {
522static const struct dev_pm_ops tegra30_i2s_pm_ops = { 540static const struct dev_pm_ops tegra30_i2s_pm_ops = {
523 SET_RUNTIME_PM_OPS(tegra30_i2s_runtime_suspend, 541 SET_RUNTIME_PM_OPS(tegra30_i2s_runtime_suspend,
524 tegra30_i2s_runtime_resume, NULL) 542 tegra30_i2s_runtime_resume, NULL)
543 SET_SYSTEM_SLEEP_PM_OPS(tegra30_i2s_suspend, tegra30_i2s_resume)
525}; 544};
526 545
527static struct platform_driver tegra30_i2s_driver = { 546static struct platform_driver tegra30_i2s_driver = {