diff options
Diffstat (limited to 'include/linux/nfc.h')
-rw-r--r-- | include/linux/nfc.h | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/include/linux/nfc.h b/include/linux/nfc.h index 0ae9b5857c83..6189f27e305b 100644 --- a/include/linux/nfc.h +++ b/include/linux/nfc.h | |||
@@ -56,6 +56,10 @@ | |||
56 | * %NFC_ATTR_PROTOCOLS) | 56 | * %NFC_ATTR_PROTOCOLS) |
57 | * @NFC_EVENT_DEVICE_REMOVED: event emitted when a device is removed | 57 | * @NFC_EVENT_DEVICE_REMOVED: event emitted when a device is removed |
58 | * (it sends %NFC_ATTR_DEVICE_INDEX) | 58 | * (it sends %NFC_ATTR_DEVICE_INDEX) |
59 | * @NFC_EVENT_TM_ACTIVATED: event emitted when the adapter is activated in | ||
60 | * target mode. | ||
61 | * @NFC_EVENT_DEVICE_DEACTIVATED: event emitted when the adapter is deactivated | ||
62 | * from target mode. | ||
59 | */ | 63 | */ |
60 | enum nfc_commands { | 64 | enum nfc_commands { |
61 | NFC_CMD_UNSPEC, | 65 | NFC_CMD_UNSPEC, |
@@ -71,6 +75,8 @@ enum nfc_commands { | |||
71 | NFC_EVENT_DEVICE_ADDED, | 75 | NFC_EVENT_DEVICE_ADDED, |
72 | NFC_EVENT_DEVICE_REMOVED, | 76 | NFC_EVENT_DEVICE_REMOVED, |
73 | NFC_EVENT_TARGET_LOST, | 77 | NFC_EVENT_TARGET_LOST, |
78 | NFC_EVENT_TM_ACTIVATED, | ||
79 | NFC_EVENT_TM_DEACTIVATED, | ||
74 | /* private: internal use only */ | 80 | /* private: internal use only */ |
75 | __NFC_CMD_AFTER_LAST | 81 | __NFC_CMD_AFTER_LAST |
76 | }; | 82 | }; |
@@ -94,6 +100,8 @@ enum nfc_commands { | |||
94 | * @NFC_ATTR_TARGET_SENSF_RES: NFC-F targets extra information, max 18 bytes | 100 | * @NFC_ATTR_TARGET_SENSF_RES: NFC-F targets extra information, max 18 bytes |
95 | * @NFC_ATTR_COMM_MODE: Passive or active mode | 101 | * @NFC_ATTR_COMM_MODE: Passive or active mode |
96 | * @NFC_ATTR_RF_MODE: Initiator or target | 102 | * @NFC_ATTR_RF_MODE: Initiator or target |
103 | * @NFC_ATTR_IM_PROTOCOLS: Initiator mode protocols to poll for | ||
104 | * @NFC_ATTR_TM_PROTOCOLS: Target mode protocols to listen for | ||
97 | */ | 105 | */ |
98 | enum nfc_attrs { | 106 | enum nfc_attrs { |
99 | NFC_ATTR_UNSPEC, | 107 | NFC_ATTR_UNSPEC, |
@@ -109,6 +117,8 @@ enum nfc_attrs { | |||
109 | NFC_ATTR_COMM_MODE, | 117 | NFC_ATTR_COMM_MODE, |
110 | NFC_ATTR_RF_MODE, | 118 | NFC_ATTR_RF_MODE, |
111 | NFC_ATTR_DEVICE_POWERED, | 119 | NFC_ATTR_DEVICE_POWERED, |
120 | NFC_ATTR_IM_PROTOCOLS, | ||
121 | NFC_ATTR_TM_PROTOCOLS, | ||
112 | /* private: internal use only */ | 122 | /* private: internal use only */ |
113 | __NFC_ATTR_AFTER_LAST | 123 | __NFC_ATTR_AFTER_LAST |
114 | }; | 124 | }; |
@@ -118,6 +128,7 @@ enum nfc_attrs { | |||
118 | #define NFC_NFCID1_MAXSIZE 10 | 128 | #define NFC_NFCID1_MAXSIZE 10 |
119 | #define NFC_SENSB_RES_MAXSIZE 12 | 129 | #define NFC_SENSB_RES_MAXSIZE 12 |
120 | #define NFC_SENSF_RES_MAXSIZE 18 | 130 | #define NFC_SENSF_RES_MAXSIZE 18 |
131 | #define NFC_GB_MAXSIZE 48 | ||
121 | 132 | ||
122 | /* NFC protocols */ | 133 | /* NFC protocols */ |
123 | #define NFC_PROTO_JEWEL 1 | 134 | #define NFC_PROTO_JEWEL 1 |
@@ -125,8 +136,9 @@ enum nfc_attrs { | |||
125 | #define NFC_PROTO_FELICA 3 | 136 | #define NFC_PROTO_FELICA 3 |
126 | #define NFC_PROTO_ISO14443 4 | 137 | #define NFC_PROTO_ISO14443 4 |
127 | #define NFC_PROTO_NFC_DEP 5 | 138 | #define NFC_PROTO_NFC_DEP 5 |
139 | #define NFC_PROTO_ISO14443_B 6 | ||
128 | 140 | ||
129 | #define NFC_PROTO_MAX 6 | 141 | #define NFC_PROTO_MAX 7 |
130 | 142 | ||
131 | /* NFC communication modes */ | 143 | /* NFC communication modes */ |
132 | #define NFC_COMM_ACTIVE 0 | 144 | #define NFC_COMM_ACTIVE 0 |
@@ -135,13 +147,15 @@ enum nfc_attrs { | |||
135 | /* NFC RF modes */ | 147 | /* NFC RF modes */ |
136 | #define NFC_RF_INITIATOR 0 | 148 | #define NFC_RF_INITIATOR 0 |
137 | #define NFC_RF_TARGET 1 | 149 | #define NFC_RF_TARGET 1 |
150 | #define NFC_RF_NONE 2 | ||
138 | 151 | ||
139 | /* NFC protocols masks used in bitsets */ | 152 | /* NFC protocols masks used in bitsets */ |
140 | #define NFC_PROTO_JEWEL_MASK (1 << NFC_PROTO_JEWEL) | 153 | #define NFC_PROTO_JEWEL_MASK (1 << NFC_PROTO_JEWEL) |
141 | #define NFC_PROTO_MIFARE_MASK (1 << NFC_PROTO_MIFARE) | 154 | #define NFC_PROTO_MIFARE_MASK (1 << NFC_PROTO_MIFARE) |
142 | #define NFC_PROTO_FELICA_MASK (1 << NFC_PROTO_FELICA) | 155 | #define NFC_PROTO_FELICA_MASK (1 << NFC_PROTO_FELICA) |
143 | #define NFC_PROTO_ISO14443_MASK (1 << NFC_PROTO_ISO14443) | 156 | #define NFC_PROTO_ISO14443_MASK (1 << NFC_PROTO_ISO14443) |
144 | #define NFC_PROTO_NFC_DEP_MASK (1 << NFC_PROTO_NFC_DEP) | 157 | #define NFC_PROTO_NFC_DEP_MASK (1 << NFC_PROTO_NFC_DEP) |
158 | #define NFC_PROTO_ISO14443_B_MASK (1 << NFC_PROTO_ISO14443_B) | ||
145 | 159 | ||
146 | struct sockaddr_nfc { | 160 | struct sockaddr_nfc { |
147 | sa_family_t sa_family; | 161 | sa_family_t sa_family; |