NFC: nci: Add NFCEE enabling and disabling support
NFCEEs can be enabled or disabled by sending the NCI_OP_NFCEE_MODE_SET_CMD command to the NFCC. This patch provides an API for drivers to enable and disable e.g. their NCI discoveredd secure elements. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:

committed by
Samuel Ortiz

parent
af9c8aa67d
commit
f7f793f313
@@ -284,6 +284,14 @@ struct nci_nfcee_discover_cmd {
|
||||
__u8 discovery_action;
|
||||
} __packed;
|
||||
|
||||
#define NCI_OP_NFCEE_MODE_SET_CMD nci_opcode_pack(NCI_GID_NFCEE_MGMT, 0x01)
|
||||
#define NCI_NFCEE_DISABLE 0x00
|
||||
#define NCI_NFCEE_ENABLE 0x01
|
||||
struct nci_nfcee_mode_set_cmd {
|
||||
__u8 nfcee_id;
|
||||
__u8 nfcee_mode;
|
||||
} __packed;
|
||||
|
||||
/* ----------------------- */
|
||||
/* ---- NCI Responses ---- */
|
||||
/* ----------------------- */
|
||||
@@ -333,6 +341,7 @@ struct nci_nfcee_discover_rsp {
|
||||
__u8 num_nfcee;
|
||||
} __packed;
|
||||
|
||||
#define NCI_OP_NFCEE_MODE_SET_RSP nci_opcode_pack(NCI_GID_NFCEE_MGMT, 0x01)
|
||||
/* --------------------------- */
|
||||
/* ---- NCI Notifications ---- */
|
||||
/* --------------------------- */
|
||||
|
@@ -185,6 +185,7 @@ int nci_recv_frame(struct nci_dev *ndev, struct sk_buff *skb);
|
||||
int nci_set_config(struct nci_dev *ndev, __u8 id, size_t len, __u8 *val);
|
||||
|
||||
int nci_nfcee_discover(struct nci_dev *ndev, u8 action);
|
||||
int nci_nfcee_mode_set(struct nci_dev *ndev, u8 nfcee_id, u8 nfcee_mode);
|
||||
|
||||
static inline struct sk_buff *nci_skb_alloc(struct nci_dev *ndev,
|
||||
unsigned int len,
|
||||
|
Reference in New Issue
Block a user