diff options
author | Thierry Escande <thierry.escande@linux.intel.com> | 2014-04-11 18:03:17 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2014-05-25 18:42:02 -0400 |
commit | 09592ccfc2fc38eedd63f0f50fda095e1083b657 (patch) | |
tree | 9e47fc58444aa2059a4e706494e1e4580ca08f3c /drivers/nfc/port100.c | |
parent | ef1b075c15d55c71200c63450756a9bb51ce2a60 (diff) |
NFC: port100: Add support for type 4B tag
This patch adds support for ISO-DEP protocol over NFC-B rf technology
by adding NFC_PROTO_ISO14443_B to the supported protocols and an entry
for framing configuration.
Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc/port100.c')
-rw-r--r-- | drivers/nfc/port100.c | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/drivers/nfc/port100.c b/drivers/nfc/port100.c index b7a372af5eb7..4ac4d31f6c59 100644 --- a/drivers/nfc/port100.c +++ b/drivers/nfc/port100.c | |||
@@ -28,7 +28,8 @@ | |||
28 | NFC_PROTO_MIFARE_MASK | \ | 28 | NFC_PROTO_MIFARE_MASK | \ |
29 | NFC_PROTO_FELICA_MASK | \ | 29 | NFC_PROTO_FELICA_MASK | \ |
30 | NFC_PROTO_NFC_DEP_MASK | \ | 30 | NFC_PROTO_NFC_DEP_MASK | \ |
31 | NFC_PROTO_ISO14443_MASK) | 31 | NFC_PROTO_ISO14443_MASK | \ |
32 | NFC_PROTO_ISO14443_B_MASK) | ||
32 | 33 | ||
33 | #define PORT100_CAPABILITIES (NFC_DIGITAL_DRV_CAPS_IN_CRC | \ | 34 | #define PORT100_CAPABILITIES (NFC_DIGITAL_DRV_CAPS_IN_CRC | \ |
34 | NFC_DIGITAL_DRV_CAPS_TG_CRC) | 35 | NFC_DIGITAL_DRV_CAPS_TG_CRC) |
@@ -120,6 +121,7 @@ struct port100_in_rf_setting { | |||
120 | #define PORT100_COMM_TYPE_IN_212F 0x01 | 121 | #define PORT100_COMM_TYPE_IN_212F 0x01 |
121 | #define PORT100_COMM_TYPE_IN_424F 0x02 | 122 | #define PORT100_COMM_TYPE_IN_424F 0x02 |
122 | #define PORT100_COMM_TYPE_IN_106A 0x03 | 123 | #define PORT100_COMM_TYPE_IN_106A 0x03 |
124 | #define PORT100_COMM_TYPE_IN_106B 0x07 | ||
123 | 125 | ||
124 | static const struct port100_in_rf_setting in_rf_settings[] = { | 126 | static const struct port100_in_rf_setting in_rf_settings[] = { |
125 | [NFC_DIGITAL_RF_TECH_212F] = { | 127 | [NFC_DIGITAL_RF_TECH_212F] = { |
@@ -140,6 +142,12 @@ static const struct port100_in_rf_setting in_rf_settings[] = { | |||
140 | .in_recv_set_number = 15, | 142 | .in_recv_set_number = 15, |
141 | .in_recv_comm_type = PORT100_COMM_TYPE_IN_106A, | 143 | .in_recv_comm_type = PORT100_COMM_TYPE_IN_106A, |
142 | }, | 144 | }, |
145 | [NFC_DIGITAL_RF_TECH_106B] = { | ||
146 | .in_send_set_number = 3, | ||
147 | .in_send_comm_type = PORT100_COMM_TYPE_IN_106B, | ||
148 | .in_recv_set_number = 15, | ||
149 | .in_recv_comm_type = PORT100_COMM_TYPE_IN_106B, | ||
150 | }, | ||
143 | /* Ensures the array has NFC_DIGITAL_RF_TECH_LAST elements */ | 151 | /* Ensures the array has NFC_DIGITAL_RF_TECH_LAST elements */ |
144 | [NFC_DIGITAL_RF_TECH_LAST] = { 0 }, | 152 | [NFC_DIGITAL_RF_TECH_LAST] = { 0 }, |
145 | }; | 153 | }; |
@@ -340,6 +348,32 @@ in_protocols[][PORT100_IN_MAX_NUM_PROTOCOLS + 1] = { | |||
340 | [NFC_DIGITAL_FRAMING_NFC_DEP_ACTIVATED] = { | 348 | [NFC_DIGITAL_FRAMING_NFC_DEP_ACTIVATED] = { |
341 | { PORT100_IN_PROT_END, 0 }, | 349 | { PORT100_IN_PROT_END, 0 }, |
342 | }, | 350 | }, |
351 | [NFC_DIGITAL_FRAMING_NFCB] = { | ||
352 | { PORT100_IN_PROT_INITIAL_GUARD_TIME, 20 }, | ||
353 | { PORT100_IN_PROT_ADD_CRC, 1 }, | ||
354 | { PORT100_IN_PROT_CHECK_CRC, 1 }, | ||
355 | { PORT100_IN_PROT_MULTI_CARD, 0 }, | ||
356 | { PORT100_IN_PROT_ADD_PARITY, 0 }, | ||
357 | { PORT100_IN_PROT_CHECK_PARITY, 0 }, | ||
358 | { PORT100_IN_PROT_BITWISE_AC_RECV_MODE, 0 }, | ||
359 | { PORT100_IN_PROT_VALID_BIT_NUMBER, 8 }, | ||
360 | { PORT100_IN_PROT_CRYPTO1, 0 }, | ||
361 | { PORT100_IN_PROT_ADD_SOF, 1 }, | ||
362 | { PORT100_IN_PROT_CHECK_SOF, 1 }, | ||
363 | { PORT100_IN_PROT_ADD_EOF, 1 }, | ||
364 | { PORT100_IN_PROT_CHECK_EOF, 1 }, | ||
365 | { PORT100_IN_PROT_DEAF_TIME, 4 }, | ||
366 | { PORT100_IN_PROT_CRM, 0 }, | ||
367 | { PORT100_IN_PROT_CRM_MIN_LEN, 0 }, | ||
368 | { PORT100_IN_PROT_T1_TAG_FRAME, 0 }, | ||
369 | { PORT100_IN_PROT_RFCA, 0 }, | ||
370 | { PORT100_IN_PROT_GUARD_TIME_AT_INITIATOR, 6 }, | ||
371 | { PORT100_IN_PROT_END, 0 }, | ||
372 | }, | ||
373 | [NFC_DIGITAL_FRAMING_NFCB_T4T] = { | ||
374 | /* nfc_digital_framing_nfcb */ | ||
375 | { PORT100_IN_PROT_END, 0 }, | ||
376 | }, | ||
343 | /* Ensures the array has NFC_DIGITAL_FRAMING_LAST elements */ | 377 | /* Ensures the array has NFC_DIGITAL_FRAMING_LAST elements */ |
344 | [NFC_DIGITAL_FRAMING_LAST] = { | 378 | [NFC_DIGITAL_FRAMING_LAST] = { |
345 | { PORT100_IN_PROT_END, 0 }, | 379 | { PORT100_IN_PROT_END, 0 }, |