Due to delay of ~3 sec between core reset response
and core init cmd, i2c send fails as NFC controller
goes to deep sleep state if its idle for ~1sec.
Delay caused due to logs in driver probe sequence.
Delay is added after every gpio state change to
ensure, modified value is taken into consideration
and unnecessary delays are removed.
Change-Id: I4c6e8f867f641d6648139206244d67bb556e0099
Signed-off-by: Gaurav Singhal <gsinghal@codeaurora.org>
Disable i2c write failure log because
it might cause sluggishness in device.
Change-Id: I1f4514878efd8f00e1eb019d915eaad32bd4d263
Signed-off-by: Gaurav Singhal <gsinghal@codeaurora.org>
If read function is waiting for interrupt and after that
NFCC goes to recovery, MW will call ioctl (0) and ioctl (1),
In ioctl (0) call we are disabling interrupt so read function
was waiting for interrupt and ioctl call has disabled interrupt,
now there is no possibility interrupt will be enabled again
because only read function enables the interrupt.
Enabled interrupt in ioctl (1) so that we can receive data
after reset/recovery.
Change-Id: I1677a50129534b1eaa4b8c20820a15db299cd9c1
Signed-off-by: Gaurav Singhal <gsinghal@codeaurora.org>
When the eSE is powered off, the “system” needs to give
8ms to the capacitor connected on the SVDD line to discharge.
We should inform the FW we just powered off the eSE.
Change-Id: I864fd8f75ded6ab8c42ea36bcdadcdbe924e927d
Signed-off-by: Gaurav Singhal <gsinghal@codeaurora.org>
Changes made to detect NQ chipset and firmware
version
Change-Id: Ia9caa30b88eccb99dfebe9179bb61b8c2abb5de4
Signed-off-by: Rohit Rangwani <rrangwan@codeaurora.org>
Probe function calls sleep in hardware check, which
stalls kernel booting.
Make the probe as async function to optimize boot time.
Change-Id: Idbc679951ff7bd6fcfac4ba330452e29d78d86dd
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
When NFC is not enabled, IRQ will be disabled and
then if we do suspend/resume wake up functionality
won't be enabled at suspend but we try to disable
the same at resume and cause irq warning.
Fix warning trace in below cases :
1) NFC enabled in makefile, but manually turned off in
settings menu (NFC driver is enabled and hw is present).
2) NFC is not enabled in makefile
(NFC driver is enabled and hw is present).
Change-Id: I0fd76809cd949d88ae7b820c37f0a9f349abb090
Signed-off-by: Gaurav Singhal <gsinghal@codeaurora.org>
If ese gpio is not present on target, and we disable
NFC then enable gpio should be set to LOW.
Negative gpio value is invalid case, we should avoid
gpio free for error scenario.
Change-Id: I87c890bbb66ee683129f062a2aa4c8d95d5c93ee
Signed-off-by: Gaurav Singhal <gsinghal@codeaurora.org>
Modified condition to ensure data is read
only after interrupt has occurred.
Spurious interrupt handling is done in nfc_read
instead of irq handler.
Change-Id: Ie2362610fe922e792e6358b4386c828fdd754fa8
Signed-off-by: Gaurav Singhal <gsinghal@codeaurora.org>
Some of the targets are not having ese gpio so if we try
to access this pin on these targets, crash is observed.
Change-Id: Ib5a2d7879f1b493bc445ab4a2d32a89f98d872b4
Signed-off-by: Gaurav Singhal <gsinghal@codeaurora.org>
We can't control eSE power through driver as of now
so adding gpio pin support for eSE in NQxxx driver.
Multiline comments are updated.
Change-Id: I60651052d7bf97a8a0505e76904cebe2b7c69ce2
Signed-off-by: Gaurav Singhal <gsinghal@codeaurora.org>
Error handling check added in probe function and
memory cleanup in remove function.
Change-Id: Ic8f02dcc89e716ec88b711496d1e43754b95968d
Signed-off-by: Gaurav Singhal <gsinghal@codeaurora.org>
IRQ was disabled at suspend so system was not able to
wake up during CE transaction.
Even after irq was enabled we were not able to wake up in irq handler
because wakeup event was not going due to is_suspended condition.
Change-Id: I5a088230786ef780cca0a3b767ad80e7b0c69f9e
Signed-off-by: Gaurav Singhal <gsinghal@codeaurora.org>