NFC: Add Core support to generate tag lost event

Some HW/drivers get notifications when a tag moves out of the radio field.
This notification is now forwarded to user space through netlink.

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Eric Lapuyade
2012-04-10 19:43:12 +02:00
committed by John W. Linville
parent 144612cacc
commit c8d56ae786
2 changed files with 76 additions and 1 deletions

View File

@@ -62,6 +62,7 @@ struct nfc_ops {
int (*data_exchange)(struct nfc_dev *dev, u32 target_idx,
struct sk_buff *skb, data_exchange_cb_t cb,
void *cb_context);
int (*check_presence)(struct nfc_dev *dev, u32 target_idx);
};
#define NFC_TARGET_IDX_ANY -1
@@ -107,6 +108,10 @@ struct nfc_dev {
int tx_headroom;
int tx_tailroom;
struct timer_list check_pres_timer;
struct workqueue_struct *check_pres_wq;
struct work_struct check_pres_work;
struct nfc_ops *ops;
};
#define to_nfc_dev(_dev) container_of(_dev, struct nfc_dev, dev)