Commit 444fb98e authored by Thierry Escande's avatar Thierry Escande Committed by Samuel Ortiz

NFC: digital: Add a note about asynchronous functions

This explains how and why the timeout parameter must be handled by the
driver implementation.
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent ea87a5ef
...@@ -122,6 +122,16 @@ typedef void (*nfc_digital_cmd_complete_t)(struct nfc_digital_dev *ddev, ...@@ -122,6 +122,16 @@ typedef void (*nfc_digital_cmd_complete_t)(struct nfc_digital_dev *ddev,
* switch_rf to turn the radio on. A call to in|tg_configure_hw must turn * switch_rf to turn the radio on. A call to in|tg_configure_hw must turn
* the device radio on. * the device radio on.
* @abort_cmd: Discard the last sent command. * @abort_cmd: Discard the last sent command.
*
* Notes: Asynchronous functions have a timeout parameter. It is the driver
* responsibility to call the digital stack back through the
* nfc_digital_cmd_complete_t callback when no RF respsonse has been
* received within the specified time (in milliseconds). In that case the
* driver must set the resp sk_buff to ERR_PTR(-ETIMEDOUT).
* Since the digital stack serializes commands to be sent, it's mandatory
* for the driver to handle the timeout correctly. Otherwise the stack
* would not be able to send new commands, waiting for the reply of the
* current one.
*/ */
struct nfc_digital_ops { struct nfc_digital_ops {
int (*in_configure_hw)(struct nfc_digital_dev *ddev, int type, int (*in_configure_hw)(struct nfc_digital_dev *ddev, int type,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment