summaryrefslogtreecommitdiffstats
path: root/halimpl
diff options
context:
space:
mode:
authorRuchi Kandoi <kandoiruchi@google.com>2017-06-28 16:11:18 -0700
committerRuchi Kandoi <kandoiruchi@google.com>2017-06-28 16:17:36 -0700
commit5e0a2fd7d049de20e69e0dfdf03daaaab2aab4b1 (patch)
treeffe221b9462907370b7ec2cbd1b2124569a41265 /halimpl
parenta2af20f10043e1e682d54c57bbb7bacab65fe538 (diff)
downloadandroid_hardware_broadcom_nfc-5e0a2fd7d049de20e69e0dfdf03daaaab2aab4b1.tar.gz
android_hardware_broadcom_nfc-5e0a2fd7d049de20e69e0dfdf03daaaab2aab4b1.tar.bz2
android_hardware_broadcom_nfc-5e0a2fd7d049de20e69e0dfdf03daaaab2aab4b1.zip
Add delay before retrying write to NFCC
NFC controller might throw a write error if it's in stand by mode. Add 10 ms delay before retrying to make sure the NFCC has resumed. Bug: 62068060 Test: Nfc tag reading Change-Id: I26d810cbb657cbf38d3df8ad366ff23d9ace594d (cherry picked from commit 71794bd233b9c284451c2a6e12f20aed8aa2b03b)
Diffstat (limited to 'halimpl')
-rw-r--r--halimpl/pn54x/tml/phTmlNfc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/halimpl/pn54x/tml/phTmlNfc.c b/halimpl/pn54x/tml/phTmlNfc.c
index 995c9ba..8aad810 100644
--- a/halimpl/pn54x/tml/phTmlNfc.c
+++ b/halimpl/pn54x/tml/phTmlNfc.c
@@ -451,6 +451,8 @@ static void phTmlNfc_TmlWriterThread(void* pParam) {
if (retry_cnt++ < MAX_WRITE_RETRY_COUNT) {
NXPLOG_NCIHAL_E("PN54X - Error in I2C Write - Retry 0x%x",
retry_cnt);
+ // Add a 10 ms delay to ensure NFCC is not still in stand by mode.
+ usleep(10 * 1000);
goto retry;
}
}