Lines Matching defs:hdev

157 	struct nfc_hci_dev *hdev;
164 static int microread_open(struct nfc_hci_dev *hdev)
166 struct microread_info *info = nfc_hci_get_clientdata(hdev);
171 static void microread_close(struct nfc_hci_dev *hdev)
173 struct microread_info *info = nfc_hci_get_clientdata(hdev);
178 static int microread_hci_ready(struct nfc_hci_dev *hdev)
184 r = nfc_hci_send_cmd(hdev, MICROREAD_GATE_ID_MREAD_ISO_A,
189 r = nfc_hci_send_cmd(hdev, MICROREAD_GATE_ID_MREAD_ISO_A_3,
197 r = nfc_hci_send_cmd(hdev, MICROREAD_GATE_ID_MREAD_ISO_B,
202 r = nfc_hci_send_cmd(hdev, MICROREAD_GATE_ID_MREAD_NFC_T1,
211 r = nfc_hci_send_cmd(hdev, MICROREAD_GATE_ID_MREAD_NFC_T3,
217 static int microread_xmit(struct nfc_hci_dev *hdev, struct sk_buff *skb)
219 struct microread_info *info = nfc_hci_get_clientdata(hdev);
224 static int microread_start_poll(struct nfc_hci_dev *hdev,
254 hdev->gb = nfc_get_local_general_bytes(hdev->ndev,
255 &hdev->gb_len);
256 if (hdev->gb == NULL || hdev->gb_len == 0) {
262 r = nfc_hci_send_event(hdev, MICROREAD_GATE_ID_MREAD_ISO_A,
268 r = nfc_hci_set_param(hdev, MICROREAD_GATE_ID_P2P_TARGET,
274 r = nfc_hci_set_param(hdev, MICROREAD_GATE_ID_P2P_INITIATOR,
276 hdev->gb, hdev->gb_len);
282 r = nfc_hci_set_param(hdev, MICROREAD_GATE_ID_P2P_TARGET,
284 hdev->gb, hdev->gb_len);
289 r = nfc_hci_set_param(hdev, MICROREAD_GATE_ID_P2P_TARGET,
295 return nfc_hci_send_event(hdev, MICROREAD_GATE_ID_MREAD_ISO_A,
300 static int microread_dep_link_up(struct nfc_hci_dev *hdev,
307 r = nfc_hci_get_param(hdev, target->hci_reader_gate,
317 r = nfc_set_remote_general_bytes(hdev->ndev, rgb_skb->data,
320 r = nfc_dep_link_is_up(hdev->ndev, target->idx, comm_mode,
328 static int microread_dep_link_down(struct nfc_hci_dev *hdev)
330 return nfc_hci_send_event(hdev, MICROREAD_GATE_ID_P2P_INITIATOR,
334 static int microread_target_from_gate(struct nfc_hci_dev *hdev, u8 gate,
348 static int microread_complete_target_discovered(struct nfc_hci_dev *hdev,
397 static int microread_im_transceive(struct nfc_hci_dev *hdev,
402 struct microread_info *info = nfc_hci_get_clientdata(hdev);
411 return nfc_hci_send_event(hdev, target->hci_reader_gate,
449 return nfc_hci_send_cmd_async(hdev, target->hci_reader_gate,
455 static int microread_tm_send(struct nfc_hci_dev *hdev, struct sk_buff *skb)
459 r = nfc_hci_send_event(hdev, MICROREAD_GATE_ID_P2P_TARGET,
468 static void microread_target_discovered(struct nfc_hci_dev *hdev, u8 gate,
535 r = nfc_targets_found(hdev->ndev, targets, 1);
547 static int microread_event_received(struct nfc_hci_dev *hdev, u8 pipe,
551 u8 gate = hdev->pipes[pipe].gate;
558 microread_target_discovered(hdev, gate, skb);
574 r = nfc_tm_data_received(hdev->ndev, skb);
583 r = nfc_tm_activated(hdev->ndev, NFC_PROTO_NFC_DEP_MASK,
603 r = nfc_tm_data_received(hdev->ndev, skb);
610 r = nfc_hci_set_param(hdev, MICROREAD_GATE_ID_P2P_TARGET,
615 r = nfc_hci_send_event(hdev, gate,
645 int phy_payload, struct nfc_hci_dev **hdev)
676 info->hdev = nfc_hci_allocate_device(&microread_hci_ops, &init_data,
683 if (!info->hdev) {
684 pr_err("Cannot allocate nfc hdev\n");
689 nfc_hci_set_clientdata(info->hdev, info);
691 r = nfc_hci_register_device(info->hdev);
695 *hdev = info->hdev;
700 nfc_hci_free_device(info->hdev);
710 void microread_remove(struct nfc_hci_dev *hdev)
712 struct microread_info *info = nfc_hci_get_clientdata(hdev);
714 nfc_hci_unregister_device(hdev);
715 nfc_hci_free_device(hdev);