Commit graph

9 commits

Author SHA1 Message Date
Rohit Rangwani
efbf7c961b NFC: Detection of NQ chip set and firmware version
Changes made to detect NQ chipset and firmware
version

Change-Id: Ia9caa30b88eccb99dfebe9179bb61b8c2abb5de4
Signed-off-by: Rohit Rangwani <rrangwan@codeaurora.org>
2016-11-07 16:23:44 +05:30
Gaurav Singhal
6f13460739 NFC: Fix unbalanced irq warning stack trace
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>
2016-08-17 10:38:00 +05:30
Gaurav Singhal
8e0e68f525 NFC: Set enable gpio to low
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>
2016-08-16 15:33:20 +05:30
Gaurav Singhal
f2e141460b NFC: IRQ gpio usage modification in nfc_read
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>
2016-08-04 23:54:16 -07:00
Gaurav Singhal
d874608e42 NFC: Fix crash due to invalid use of ese gpio
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>
2016-06-28 23:25:01 -07:00
Gaurav Singhal
424b4b2157 NFC: Add eSE power request gpio pin support
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>
2016-06-17 15:18:53 -07:00
Gaurav Singhal
917e41ac91 NFC: Error handling correction in probe
Error handling check added in probe function and
memory cleanup in remove function.

Change-Id: Ic8f02dcc89e716ec88b711496d1e43754b95968d
Signed-off-by: Gaurav Singhal <gsinghal@codeaurora.org>
2016-06-10 15:13:25 -07:00
Gaurav Singhal
1b18e29caa NFC: CE transaction failed during system suspend
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>
2016-05-31 15:24:53 -07:00
Gaurav Singhal
c9f8e5943e NFC: Add snapshot of NQxxx NFC driver
Add the latest version of NQxxx NFC driver
from msm-3.18.

This change is a combination of following changes:

1) NFC: add NQxxxx driver

commit <356203701b7fd61b2d9776fac4fac6427735248b>

2) NFC: change reset and read flow

commit <7620346454865b81d7086167d531aea7bb716926>

3) NFC: Enable DMA and CLK_REQ gpio config issue fix

commit <150dbf117709b5677f86e5ced86b468731019b8b>

4) NFC: Fix function descriptions

commit <c0248d70200c8e09a983758750632b7a75e422d3>

5) nq-nci: enable NFCC hardware check and clock to NQxx

commit <2a92c1d6135f2d1e8fe3f2afcd290a2b1311a5a2>

6) nq-nci: XO shut down issue fix

commit <8938151d4650fca6d42efdbce138aea9bad7eca0>

7) NFC: Remove sleep from irq handler

commit <8ea2c805108cbf59b8e2abf87ee207fbf08fad97>

8) NFC: Remove DMA allocation and stack use in write

commit <c1552090e4c46e1eeca756d0a7b4427f94eab0c3>

CRs-Fixed: 890678, 892310, 955860, 968399, 993292
Change-Id: Ibb861ebdc63d45699369e23c077589d37e024b5e
Signed-off-by: Gaurav Singhal <gsinghal@codeaurora.org>
2016-05-18 13:37:18 -07:00