NFC: Add HCI quirks to support driver (non)standard implementations

Some chips diverge from the HCI spec in their implementation of standard
features. This adds a new quirks parameter to
nfc_hci_allocate_device() to let the driver indicate its divergence.

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Eric Lapuyade
2012-12-18 14:15:49 +01:00
committed by Samuel Ortiz
parent 924d4a023e
commit bf71ab8ba5
4 changed files with 23 additions and 2 deletions

View File

@@ -82,6 +82,16 @@ typedef int (*xmit) (struct sk_buff *skb, void *cb_data);
#define NFC_HCI_MAX_GATES 256
/*
* These values can be specified by a driver to indicate it requires some
* adaptation of the HCI standard.
*
* NFC_HCI_QUIRK_SHORT_CLEAR - send HCI_ADM_CLEAR_ALL_PIPE cmd with no params
*/
enum {
NFC_HCI_QUIRK_SHORT_CLEAR = 0,
};
struct nfc_hci_dev {
struct nfc_dev *ndev;
@@ -131,11 +141,14 @@ struct nfc_hci_dev {
u8 *gb;
size_t gb_len;
unsigned long quirks;
};
/* hci device allocation */
struct nfc_hci_dev *nfc_hci_allocate_device(struct nfc_hci_ops *ops,
struct nfc_hci_init_data *init_data,
unsigned long quirks,
u32 protocols,
const char *llc_name,
int tx_headroom,