aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorMark A. Greer <mgreer@animalcreek.com>2014-07-22 00:24:39 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2014-07-22 19:17:31 -0400
commitbf30a67c947ed57c1cf7c68a47dc24331458037e (patch)
treeabd0341d5faa9431a964d3cd7349d5bc801b8f44 /include/net
parentf63bac94bfe2b7f98d28e5c7d3432a5060841f51 (diff)
NFC: digital: Add 'tg_listen_md' and 'tg_get_rf_tech' driver hooks
The digital layer of the NFC subsystem currently supports a 'tg_listen_mdaa' driver hook that supports devices that can do mode detection and automatic anticollision. However, there are some devices that can do mode detection but not automatic anitcollision so add the 'tg_listen_md' hook to support those devices. In order for the digital layer to get the RF technology detected by the device from the driver, add the 'tg_get_rf_tech' hook. It is only valid to call this hook immediately after a successful call to 'tg_listen_md'. CC: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Mark A. Greer <mgreer@animalcreek.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/nfc/digital.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/net/nfc/digital.h b/include/net/nfc/digital.h
index 575d668b7852..d9a5cf7ac1c4 100644
--- a/include/net/nfc/digital.h
+++ b/include/net/nfc/digital.h
@@ -127,6 +127,15 @@ typedef void (*nfc_digital_cmd_complete_t)(struct nfc_digital_dev *ddev,
127 * the NFC-DEP ATR_REQ command through cb. The digital stack deducts the RF 127 * the NFC-DEP ATR_REQ command through cb. The digital stack deducts the RF
128 * tech by analyzing the SoD of the frame containing the ATR_REQ command. 128 * tech by analyzing the SoD of the frame containing the ATR_REQ command.
129 * This is an asynchronous function. 129 * This is an asynchronous function.
130 * @tg_listen_md: If supported, put the device in automatic listen mode with
131 * mode detection but without automatic anti-collision. In this mode, the
132 * device automatically detects the RF technology. What the actual
133 * RF technology is can be retrieved by calling @tg_get_rf_tech.
134 * The digital stack will then perform the appropriate anti-collision
135 * sequence. This is an asynchronous function.
136 * @tg_get_rf_tech: Required when @tg_listen_md is supported, unused otherwise.
137 * Return the RF Technology that was detected by the @tg_listen_md call.
138 * This is a synchronous function.
130 * 139 *
131 * @switch_rf: Turns device radio on or off. The stack does not call explicitly 140 * @switch_rf: Turns device radio on or off. The stack does not call explicitly
132 * switch_rf to turn the radio on. A call to in|tg_configure_hw must turn 141 * switch_rf to turn the radio on. A call to in|tg_configure_hw must turn
@@ -161,6 +170,9 @@ struct nfc_digital_ops {
161 struct digital_tg_mdaa_params *mdaa_params, 170 struct digital_tg_mdaa_params *mdaa_params,
162 u16 timeout, nfc_digital_cmd_complete_t cb, 171 u16 timeout, nfc_digital_cmd_complete_t cb,
163 void *arg); 172 void *arg);
173 int (*tg_listen_md)(struct nfc_digital_dev *ddev, u16 timeout,
174 nfc_digital_cmd_complete_t cb, void *arg);
175 int (*tg_get_rf_tech)(struct nfc_digital_dev *ddev, u8 *rf_tech);
164 176
165 int (*switch_rf)(struct nfc_digital_dev *ddev, bool on); 177 int (*switch_rf)(struct nfc_digital_dev *ddev, bool on);
166 void (*abort_cmd)(struct nfc_digital_dev *ddev); 178 void (*abort_cmd)(struct nfc_digital_dev *ddev);