]> git.baikalelectronics.ru Git - kernel.git/commit
NFC: trf7970a: Handle timeout values of zero
authorMark A. Greer <mgreer@animalcreek.com>
Tue, 2 Sep 2014 22:12:44 +0000 (15:12 -0700)
committerSamuel Ortiz <sameo@linux.intel.com>
Sun, 7 Sep 2014 21:13:45 +0000 (23:13 +0200)
commitd9604f2852ca28b19017dfaf0af1a6d68a8f5860
treed515e99992c63e9063d613fabd6375ef6ac28f15
parentd4707e3d39bfe69add7c29ba2f537826110e2594
NFC: trf7970a: Handle timeout values of zero

The digital layer can try to send a command with a
timeout value of zero (e.g., digital_tg_send_psl_res().
The zero value is used as a flag to indicate that
the driver should not expect a response.  To handle
this, the driver sets an internal timer because it
should still get an interrupt with the TX bit set
in the IRQ Status Register.  When it gets that
interrupt, it returns a return value of '0'.
If it doesn't get the interrupt before timing out,
it returns ETIMEDOUT as usual.

Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/nfc/trf7970a.c