From: Mark Brown Date: Mon, 26 Oct 2015 02:07:40 +0000 (+0900) Subject: Merge branch 'topic/fsl-mega-fast' of git://git.kernel.org/pub/scm/linux/kernel/git... X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ce247b45a3289f88008c13ca26ccde0db5fea690;p=linux-beck.git Merge branch 'topic/fsl-mega-fast' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-fsl --- ce247b45a3289f88008c13ca26ccde0db5fea690 diff --cc sound/soc/fsl/fsl_sai.c index 2150f5aaba7a,5c737f167c5d..38505f32ebe6 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@@ -801,8 -804,36 +804,37 @@@ static const struct of_device_id fsl_sa { .compatible = "fsl,imx6sx-sai", }, { /* sentinel */ } }; +MODULE_DEVICE_TABLE(of, fsl_sai_ids); + #if CONFIG_PM_SLEEP + static int fsl_sai_suspend(struct device *dev) + { + struct fsl_sai *sai = dev_get_drvdata(dev); + + regcache_cache_only(sai->regmap, true); + regcache_mark_dirty(sai->regmap); + + return 0; + } + + static int fsl_sai_resume(struct device *dev) + { + struct fsl_sai *sai = dev_get_drvdata(dev); + + regcache_cache_only(sai->regmap, false); + regmap_write(sai->regmap, FSL_SAI_TCSR, FSL_SAI_CSR_SR); + regmap_write(sai->regmap, FSL_SAI_RCSR, FSL_SAI_CSR_SR); + msleep(1); + regmap_write(sai->regmap, FSL_SAI_TCSR, 0); + regmap_write(sai->regmap, FSL_SAI_RCSR, 0); + return regcache_sync(sai->regmap); + } + #endif /* CONFIG_PM_SLEEP */ + + static const struct dev_pm_ops fsl_sai_pm_ops = { + SET_SYSTEM_SLEEP_PM_OPS(fsl_sai_suspend, fsl_sai_resume) + }; + static struct platform_driver fsl_sai_driver = { .probe = fsl_sai_probe, .driver = {