diff options
author | Thierry Escande <thierry.escande@linux.intel.com> | 2014-01-02 11:58:12 +0100 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2014-01-04 03:35:34 +0100 |
commit | 444fb98eed98f7292a83f9bf123d1c78f171327e (patch) | |
tree | 9aa011b169ca27e03fddaf7913ceaf7d8f97e167 /include/net/nfc | |
parent | NFC: pn533: Frame is invalid if ccid.datalen is 0 (diff) | |
download | linux-444fb98eed98f7292a83f9bf123d1c78f171327e.tar.xz linux-444fb98eed98f7292a83f9bf123d1c78f171327e.zip |
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: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/net/nfc')
-rw-r--r-- | include/net/nfc/digital.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/nfc/digital.h b/include/net/nfc/digital.h index 36acecd5f06c..81af21e9bcd4 100644 --- a/include/net/nfc/digital.h +++ b/include/net/nfc/digital.h @@ -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 * the device radio on. * @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 { int (*in_configure_hw)(struct nfc_digital_dev *ddev, int type, |