Lines Matching refs:target
456 struct nfc_target *target, u8 comm_mode, in pn544_hci_dep_link_up() argument
462 r = nfc_hci_get_param(hdev, target->hci_reader_gate, in pn544_hci_dep_link_up()
478 r = nfc_dep_link_is_up(hdev->ndev, target->idx, comm_mode, in pn544_hci_dep_link_up()
493 struct nfc_target *target) in pn544_hci_target_from_gate() argument
497 target->supported_protocols = NFC_PROTO_FELICA_MASK; in pn544_hci_target_from_gate()
500 target->supported_protocols = NFC_PROTO_JEWEL_MASK; in pn544_hci_target_from_gate()
501 target->sens_res = 0x0c00; in pn544_hci_target_from_gate()
504 target->supported_protocols = NFC_PROTO_NFC_DEP_MASK; in pn544_hci_target_from_gate()
515 struct nfc_target *target) in pn544_hci_complete_target_discovered() argument
523 if (target->supported_protocols & NFC_PROTO_NFC_DEP_MASK) { in pn544_hci_complete_target_discovered()
530 target->hci_reader_gate = PN544_RF_READER_NFCIP1_INITIATOR_GATE; in pn544_hci_complete_target_discovered()
531 } else if (target->supported_protocols & NFC_PROTO_MIFARE_MASK) { in pn544_hci_complete_target_discovered()
532 if (target->nfcid1_len != 4 && target->nfcid1_len != 7 && in pn544_hci_complete_target_discovered()
533 target->nfcid1_len != 10) in pn544_hci_complete_target_discovered()
538 target->nfcid1, target->nfcid1_len, NULL); in pn544_hci_complete_target_discovered()
539 } else if (target->supported_protocols & NFC_PROTO_FELICA_MASK) { in pn544_hci_complete_target_discovered()
560 target->supported_protocols = NFC_PROTO_NFC_DEP_MASK; in pn544_hci_complete_target_discovered()
561 target->hci_reader_gate = in pn544_hci_complete_target_discovered()
569 } else if (target->supported_protocols & NFC_PROTO_ISO14443_MASK) { in pn544_hci_complete_target_discovered()
574 if (target->sens_res == 0x4403) /* Type 4 Mifare DESFire */ in pn544_hci_complete_target_discovered()
615 struct nfc_target *target, in pn544_hci_im_transceive() argument
622 target->hci_reader_gate); in pn544_hci_im_transceive()
624 switch (target->hci_reader_gate) { in pn544_hci_im_transceive()
626 if (target->supported_protocols & NFC_PROTO_MIFARE_MASK) { in pn544_hci_im_transceive()
645 target->hci_reader_gate, in pn544_hci_im_transceive()
659 return nfc_hci_send_cmd_async(hdev, target->hci_reader_gate, in pn544_hci_im_transceive()
664 return nfc_hci_send_cmd_async(hdev, target->hci_reader_gate, in pn544_hci_im_transceive()
670 return nfc_hci_send_event(hdev, target->hci_reader_gate, in pn544_hci_im_transceive()
694 struct nfc_target *target) in pn544_hci_check_presence() argument
696 pr_debug("supported protocol %d\b", target->supported_protocols); in pn544_hci_check_presence()
697 if (target->supported_protocols & (NFC_PROTO_ISO14443_MASK | in pn544_hci_check_presence()
699 return nfc_hci_send_cmd(hdev, target->hci_reader_gate, in pn544_hci_check_presence()
702 } else if (target->supported_protocols & NFC_PROTO_MIFARE_MASK) { in pn544_hci_check_presence()
703 if (target->nfcid1_len != 4 && target->nfcid1_len != 7 && in pn544_hci_check_presence()
704 target->nfcid1_len != 10) in pn544_hci_check_presence()
709 target->nfcid1, target->nfcid1_len, NULL); in pn544_hci_check_presence()
710 } else if (target->supported_protocols & (NFC_PROTO_JEWEL_MASK | in pn544_hci_check_presence()
713 } else if (target->supported_protocols & NFC_PROTO_NFC_DEP_MASK) { in pn544_hci_check_presence()
714 return nfc_hci_send_cmd(hdev, target->hci_reader_gate, in pn544_hci_check_presence()