rt5639: Ensure codec readiness after LDO1_EN is pulled high
authorAsha T <atalambedu@nvidia.com>
Thu, 4 Jun 2015 09:22:49 +0000 (14:22 +0530)
committerDara Ramesh <dramesh@nvidia.com>
Wed, 24 Jun 2015 05:38:54 +0000 (22:38 -0700)
commitb9c2b9bf89177ec82fd8fd4de8c9b07b979fb773
tree6241a5197f4c081d5e8387332cc6a71947a64c5e
parenta20583804064d601daebaa0ac3d1425d9482fad8
rt5639: Ensure codec readiness after LDO1_EN is pulled high

There are no checks for return values of reg_write calls in
codec probe function. Added check for MXFA 11th and 0th bit
in codec probe call. If I2C write/read fails, Keep a conditional
delay 100ms and try again after that, keep retrying for programmed
retry counts. If it (reg. write/read back) fails even after that,
return probe failure. Audio won't work on speaker/headset if all
retries fail.

Bug 200107647

Reviewed-on: http://git-master/r/752441
(cherry picked from commit 385e37c77970fdae11c83811df9e2b9ea635cb3f)
Change-Id: I5c3a2133c9079b7f4dcd145e4984ee23ed1b343b
Signed-off-by: Asha T <atalambedu@nvidia.com>
Signed-off-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-on: http://git-master/r/758965
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
sound/soc/codecs/rt5639.c