ASoC: max98373: Added max98373_reset for stable amp reset
authorRyan Lee <RyanS.Lee@maximintegrated.com>
Fri, 30 Nov 2018 03:21:09 +0000 (03:21 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 4 Dec 2018 16:29:49 +0000 (16:29 +0000)
commit20f2ab247d3b787af91c1aa5eb27c5061744c154
tree2036f8d5ebde720ca48b6297b36b16bdf2704ba7
parent0e3460bceedc98176684602a34659d51cd8bd4ce
ASoC: max98373: Added max98373_reset for stable amp reset

This patch added max98373_reset function to avoid amp software reset failure and code duplication.
Reset verification step has been added for stable amp reset and it repeats verification maximum 3 times when it is failed.
Chip revision ID is available when the amp is in the idle state which means software reset is completed well.
Additional 10ms delay was added for every retrial and maximum 30ms delay can be applied.

Signed-off-by: Ryan Lee <ryans.lee@maximintegrated.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/max98373.c