summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/adau7118-i2c.c
diff options
context:
space:
mode:
authorYong Zhi <yong.zhi@intel.com>2020-05-02 02:44:21 +0300
committerMark Brown <broonie@kernel.org>2020-05-04 15:27:01 +0300
commit1a446873d7dd3a450f685928ce7f1907bde4583d (patch)
treecf06772f7d24cbc99ba1e5ca2a46515044b63bc3 /sound/soc/codecs/adau7118-i2c.c
parentafcbaa20d662ce8c78b70e953fa8a045c7a243fb (diff)
downloadlinux-1a446873d7dd3a450f685928ce7f1907bde4583d.tar.xz
ASoC: max98373: reorder max98373_reset() in resume
During S3 test, the following error was observed: [ 726.174237] i2c_designware i2c_designware.0: platform_pm_resume+0x0/0x3d returned 0 after 0 usecs [ 726.184187] max98373 i2c-MX98373:00: calling max98373_resume+0x0/0x30 [snd_soc_max98373] @ 12698, parent: i2c-11 [ 726.195589] max98373 i2c-MX98373:00: Reset command failed. (ret:-16) When calling regmap_update_bits(), since map->reg_update_bits is NULL, _regmap_read() is entered with the following logic: if (!map->cache_bypass) { ret = regcache_read(map, reg, val); if (ret == 0) return 0; } if (map->cache_only) return -EBUSY; regcache_read() hits -EINVAL because MAX98373_R2000_SW_RESET is volatile, as map->cache_only is set by codec suspend, thus -EBUSY is returned. Fix by moving max98373_reset() after cache_only set to false in max98373_resume(). Signed-off-by: Yong Zhi <yong.zhi@intel.com> Link: https://lore.kernel.org/r/1588376661-29799-1-git-send-email-yong.zhi@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/adau7118-i2c.c')
0 files changed, 0 insertions, 0 deletions