NFC: trf7970a: Add support for Felica Type 3 tags
authorMark A. Greer <mgreer@animalcreek.com>
Mon, 14 Apr 2014 17:04:10 +0000 (10:04 -0700)
committerSamuel Ortiz <sameo@linux.intel.com>
Sun, 25 May 2014 23:28:28 +0000 (01:28 +0200)
Add support for the Felica protocol and Type 3 tags.
Both 212 and 424 kbps are supported.

Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/nfc/trf7970a.c

index efb3659..3b78b03 100644 (file)
 
 #define TRF7970A_SUPPORTED_PROTOCOLS \
                (NFC_PROTO_MIFARE_MASK | NFC_PROTO_ISO14443_MASK |      \
-                NFC_PROTO_ISO14443_B_MASK | NFC_PROTO_ISO15693_MASK)
+                NFC_PROTO_ISO14443_B_MASK | NFC_PROTO_FELICA_MASK | \
+                NFC_PROTO_ISO15693_MASK)
 
 #define TRF7970A_AUTOSUSPEND_DELAY             30000 /* 30 seconds */
 
@@ -867,6 +868,14 @@ static int trf7970a_config_rf_tech(struct trf7970a *trf, int tech)
                trf->iso_ctrl_tech = TRF7970A_ISO_CTRL_14443B_106;
                trf->modulator_sys_clk_ctrl = TRF7970A_MODULATOR_DEPTH_ASK10;
                break;
+       case NFC_DIGITAL_RF_TECH_212F:
+               trf->iso_ctrl_tech = TRF7970A_ISO_CTRL_FELICA_212;
+               trf->modulator_sys_clk_ctrl = TRF7970A_MODULATOR_DEPTH_ASK10;
+               break;
+       case NFC_DIGITAL_RF_TECH_424F:
+               trf->iso_ctrl_tech = TRF7970A_ISO_CTRL_FELICA_424;
+               trf->modulator_sys_clk_ctrl = TRF7970A_MODULATOR_DEPTH_ASK10;
+               break;
        case NFC_DIGITAL_RF_TECH_ISO15693:
                trf->iso_ctrl_tech = TRF7970A_ISO_CTRL_15693_SGL_1OF4_2648;
                trf->modulator_sys_clk_ctrl = TRF7970A_MODULATOR_DEPTH_OOK;
@@ -898,6 +907,8 @@ static int trf7970a_config_framing(struct trf7970a *trf, int framing)
        case NFC_DIGITAL_FRAMING_NFCA_T4T:
        case NFC_DIGITAL_FRAMING_NFCB:
        case NFC_DIGITAL_FRAMING_NFCB_T4T:
+       case NFC_DIGITAL_FRAMING_NFCF:
+       case NFC_DIGITAL_FRAMING_NFCF_T3T:
        case NFC_DIGITAL_FRAMING_ISO15693_INVENTORY:
        case NFC_DIGITAL_FRAMING_ISO15693_T5T:
                trf->tx_cmd = TRF7970A_CMD_TRANSMIT;