Lines Matching refs:r
138 int r = 0; in pn544_hci_open() local
143 r = -EBUSY; in pn544_hci_open()
147 r = info->phy_ops->enable(info->phy_id); in pn544_hci_open()
149 if (r == 0) in pn544_hci_open()
154 return r; in pn544_hci_open()
259 int r; in pn544_hci_ready() local
267 r = nfc_hci_send_cmd(hdev, PN544_SYS_MGMT_GATE, PN544_WRITE, in pn544_hci_ready()
269 if (r < 0) in pn544_hci_ready()
270 return r; in pn544_hci_ready()
288 r = nfc_hci_set_param(hdev, NFC_HCI_ADMIN_GATE, in pn544_hci_ready()
290 if (r < 0) in pn544_hci_ready()
291 return r; in pn544_hci_ready()
294 r = nfc_hci_set_param(hdev, PN544_SYS_MGMT_GATE, in pn544_hci_ready()
296 if (r < 0) in pn544_hci_ready()
297 return r; in pn544_hci_ready()
300 r = nfc_hci_set_param(hdev, NFC_HCI_RF_READER_A_GATE, in pn544_hci_ready()
302 if (r < 0) in pn544_hci_ready()
303 return r; in pn544_hci_ready()
305 r = nfc_hci_send_event(hdev, NFC_HCI_RF_READER_A_GATE, in pn544_hci_ready()
307 if (r < 0) in pn544_hci_ready()
308 return r; in pn544_hci_ready()
311 r = nfc_hci_set_param(hdev, PN544_POLLING_LOOP_MGMT_GATE, in pn544_hci_ready()
313 if (r < 0) in pn544_hci_ready()
314 return r; in pn544_hci_ready()
317 r = nfc_hci_set_param(hdev, PN544_POLLING_LOOP_MGMT_GATE, in pn544_hci_ready()
319 if (r < 0) in pn544_hci_ready()
320 return r; in pn544_hci_ready()
322 r = nfc_hci_get_param(hdev, NFC_HCI_ID_MGMT_GATE, in pn544_hci_ready()
324 if (r < 0) in pn544_hci_ready()
325 return r; in pn544_hci_ready()
352 int r; in pn544_hci_start_poll() local
362 r = nfc_hci_send_event(hdev, NFC_HCI_RF_READER_A_GATE, in pn544_hci_start_poll()
364 if (r < 0) in pn544_hci_start_poll()
365 return r; in pn544_hci_start_poll()
369 r = nfc_hci_set_param(hdev, PN544_POLLING_LOOP_MGMT_GATE, in pn544_hci_start_poll()
371 if (r < 0) in pn544_hci_start_poll()
372 return r; in pn544_hci_start_poll()
375 r = nfc_hci_set_param(hdev, PN544_POLLING_LOOP_MGMT_GATE, in pn544_hci_start_poll()
377 if (r < 0) in pn544_hci_start_poll()
378 return r; in pn544_hci_start_poll()
390 r = nfc_hci_set_param(hdev, PN544_POLLING_LOOP_MGMT_GATE, in pn544_hci_start_poll()
392 if (r < 0) in pn544_hci_start_poll()
393 return r; in pn544_hci_start_poll()
406 r = nfc_hci_send_event(hdev, in pn544_hci_start_poll()
409 if (r < 0) in pn544_hci_start_poll()
410 return r; in pn544_hci_start_poll()
412 r = nfc_hci_set_param(hdev, in pn544_hci_start_poll()
415 if (r < 0) in pn544_hci_start_poll()
416 return r; in pn544_hci_start_poll()
418 r = nfc_hci_set_param(hdev, in pn544_hci_start_poll()
421 if (r < 0) in pn544_hci_start_poll()
422 return r; in pn544_hci_start_poll()
424 r = nfc_hci_send_event(hdev, in pn544_hci_start_poll()
427 if (r < 0) in pn544_hci_start_poll()
434 r = nfc_hci_set_param(hdev, PN544_RF_READER_NFCIP1_TARGET_GATE, in pn544_hci_start_poll()
436 if (r < 0) in pn544_hci_start_poll()
437 return r; in pn544_hci_start_poll()
439 r = nfc_hci_set_param(hdev, PN544_RF_READER_NFCIP1_TARGET_GATE, in pn544_hci_start_poll()
441 if (r < 0) in pn544_hci_start_poll()
442 return r; in pn544_hci_start_poll()
444 r = nfc_hci_set_param(hdev, PN544_RF_READER_NFCIP1_TARGET_GATE, in pn544_hci_start_poll()
446 if (r < 0) in pn544_hci_start_poll()
447 return r; in pn544_hci_start_poll()
450 r = nfc_hci_send_event(hdev, NFC_HCI_RF_READER_A_GATE, in pn544_hci_start_poll()
452 if (r < 0) in pn544_hci_start_poll()
456 return r; in pn544_hci_start_poll()
464 int r; in pn544_hci_dep_link_up() local
466 r = nfc_hci_get_param(hdev, target->hci_reader_gate, in pn544_hci_dep_link_up()
468 if (r < 0) in pn544_hci_dep_link_up()
469 return r; in pn544_hci_dep_link_up()
472 r = -EPROTO; in pn544_hci_dep_link_up()
478 r = nfc_set_remote_general_bytes(hdev->ndev, rgb_skb->data, in pn544_hci_dep_link_up()
481 if (r == 0) in pn544_hci_dep_link_up()
482 r = nfc_dep_link_is_up(hdev->ndev, target->idx, comm_mode, in pn544_hci_dep_link_up()
486 return r; in pn544_hci_dep_link_up()
522 int r = 0; in pn544_hci_complete_target_discovered() local
525 return r; in pn544_hci_complete_target_discovered()
528 r = nfc_hci_send_cmd(hdev, in pn544_hci_complete_target_discovered()
531 if (r < 0) in pn544_hci_complete_target_discovered()
532 return r; in pn544_hci_complete_target_discovered()
540 r = nfc_hci_send_cmd(hdev, NFC_HCI_RF_READER_A_GATE, in pn544_hci_complete_target_discovered()
544 r = nfc_hci_get_param(hdev, PN544_RF_READER_F_GATE, in pn544_hci_complete_target_discovered()
546 if (r < 0) in pn544_hci_complete_target_discovered()
547 return r; in pn544_hci_complete_target_discovered()
554 r = nfc_hci_send_cmd(hdev, PN544_RF_READER_F_GATE, in pn544_hci_complete_target_discovered()
559 r = nfc_hci_send_cmd(hdev, in pn544_hci_complete_target_discovered()
563 if (r < 0) in pn544_hci_complete_target_discovered()
564 return r; in pn544_hci_complete_target_discovered()
574 r = nfc_hci_send_cmd(hdev, NFC_HCI_RF_READER_A_GATE, in pn544_hci_complete_target_discovered()
579 return r; in pn544_hci_complete_target_discovered()
679 int r; in pn544_hci_tm_send() local
684 r = nfc_hci_send_event(hdev, PN544_RF_READER_NFCIP1_TARGET_GATE, in pn544_hci_tm_send()
689 return r; in pn544_hci_tm_send()
733 int r; in pn544_hci_event_received() local
739 r = nfc_hci_target_discovered(hdev, gate); in pn544_hci_event_received()
741 r = nfc_hci_get_param(hdev, gate, PN544_DEP_ATR_REQ, in pn544_hci_event_received()
743 if (r < 0) in pn544_hci_event_received()
746 r = nfc_tm_activated(hdev->ndev, NFC_PROTO_NFC_DEP_MASK, in pn544_hci_event_received()
752 r = -EINVAL; in pn544_hci_event_received()
756 r = nfc_hci_send_event(hdev, gate, NFC_HCI_EVT_END_OPERATION, in pn544_hci_event_received()
761 r = -EPROTO; in pn544_hci_event_received()
767 r = -EPROTO; in pn544_hci_event_received()
780 return r; in pn544_hci_event_received()
806 int r; in pn544_hci_probe() local
811 r = -ENOMEM; in pn544_hci_probe()
845 r = -ENOMEM; in pn544_hci_probe()
851 r = nfc_hci_register_device(info->hdev); in pn544_hci_probe()
852 if (r) in pn544_hci_probe()
866 return r; in pn544_hci_probe()