summaryrefslogtreecommitdiffstats
path: root/Linux_x86/phDal4Nfc_i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'Linux_x86/phDal4Nfc_i2c.c')
-rw-r--r--Linux_x86/phDal4Nfc_i2c.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/Linux_x86/phDal4Nfc_i2c.c b/Linux_x86/phDal4Nfc_i2c.c
index 5e0b30b..4f18ffc 100644
--- a/Linux_x86/phDal4Nfc_i2c.c
+++ b/Linux_x86/phDal4Nfc_i2c.c
@@ -22,6 +22,9 @@
*
*/
+#define LOG_TAG "NFC_i2c"
+#include <utils/Log.h>
+
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
@@ -244,6 +247,16 @@ int phDal4Nfc_i2c_reset(long level)
ret = ioctl(gI2cPortContext.nHandle, PN544_SET_PWR, level);
+ /* HACK to increase reset time
+ * TODO: move this to kernel
+ */
+ if (level == 0) {
+ LOGW("sleeping a little longer...");
+ usleep(10000);
+ } else {
+ usleep(10000);
+ }
+
return ret;
}