]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
NFC Digital: Implement driver commands mechanism
authorThierry Escande <thierry.escande@linux.intel.com>
Thu, 19 Sep 2013 15:55:26 +0000 (17:55 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Wed, 25 Sep 2013 00:02:07 +0000 (02:02 +0200)
commit59ee2361c9248f07846f7a6e585768dcce18fb16
tree05cb3823442a74481dbec0a7e34e002c12dff53e
parent4b10884eb428c243ae2070a539612e645f3d9b93
NFC Digital: Implement driver commands mechanism

This implements the mechanism used to send commands to the driver in
initiator mode through in_send_cmd().

Commands are serialized and sent to the driver by using a work item
on the system workqueue. Responses are handled asynchronously by
another work item. Once the digital stack receives the response through
the command_complete callback, the next command is sent to the driver.

This also implements the polling mechanism. It's handled by a work item
cycling on all supported protocols. The start poll command for a given
protocol is sent to the driver using the mechanism described above.
The process continues until a peer is discovered or stop_poll is
called. This patch implements the poll function for NFC-A that sends a
SENS_REQ command and waits for the SENS_RES response.

Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
include/net/nfc/digital.h
net/nfc/Makefile
net/nfc/digital.h
net/nfc/digital_core.c
net/nfc/digital_technology.c [new file with mode: 0644]