Lines Matching refs:result
306 int result = 0; in st95hf_echo_command() local
309 result = st95hf_send_recv_cmd(st95context, CMD_ECHO, 0, NULL, false); in st95hf_echo_command()
310 if (result) in st95hf_echo_command()
311 return result; in st95hf_echo_command()
314 result = st95hf_spi_recv_echo_res(&st95context->spicontext, in st95hf_echo_command()
316 if (result) { in st95hf_echo_command()
318 "err: echo response receive error = 0x%x\n", result); in st95hf_echo_command()
319 return result; in st95hf_echo_command()
333 int result = 0; in secondary_configuration_type4a() local
337 result = st95hf_send_recv_cmd(stcontext, in secondary_configuration_type4a()
342 if (result) { in secondary_configuration_type4a()
343 dev_err(dev, "type a config cmd, err = 0x%x\n", result); in secondary_configuration_type4a()
344 return result; in secondary_configuration_type4a()
348 result = st95hf_send_recv_cmd(stcontext, in secondary_configuration_type4a()
353 if (result) in secondary_configuration_type4a()
354 dev_err(dev, "type a demogain cmd, err = 0x%x\n", result); in secondary_configuration_type4a()
356 return result; in secondary_configuration_type4a()
361 int result = 0; in secondary_configuration_type4b() local
364 result = st95hf_send_recv_cmd(stcontext, in secondary_configuration_type4b()
369 if (result) in secondary_configuration_type4b()
370 dev_err(dev, "type b demogain cmd, err = 0x%x\n", result); in secondary_configuration_type4b()
372 return result; in secondary_configuration_type4b()
377 int result = 0; in st95hf_select_protocol() local
385 result = st95hf_send_recv_cmd(stcontext, in st95hf_select_protocol()
390 if (result) { in st95hf_select_protocol()
392 result); in st95hf_select_protocol()
393 return result; in st95hf_select_protocol()
397 result = secondary_configuration_type4a(stcontext); in st95hf_select_protocol()
398 if (result) { in st95hf_select_protocol()
400 result); in st95hf_select_protocol()
401 return result; in st95hf_select_protocol()
406 result = st95hf_send_recv_cmd(stcontext, in st95hf_select_protocol()
411 if (result) { in st95hf_select_protocol()
413 result); in st95hf_select_protocol()
414 return result; in st95hf_select_protocol()
424 result = secondary_configuration_type4b(stcontext); in st95hf_select_protocol()
425 if (result) { in st95hf_select_protocol()
427 result); in st95hf_select_protocol()
428 return result; in st95hf_select_protocol()
433 result = st95hf_send_recv_cmd(stcontext, in st95hf_select_protocol()
438 if (result) { in st95hf_select_protocol()
440 result); in st95hf_select_protocol()
441 return result; in st95hf_select_protocol()
475 int result = 0; in st95hf_send_spi_reset_sequence() local
478 result = st95hf_spi_send(&st95context->spicontext, in st95hf_send_spi_reset_sequence()
482 if (result) { in st95hf_send_spi_reset_sequence()
484 "spi reset sequence cmd error = %d", result); in st95hf_send_spi_reset_sequence()
485 return result; in st95hf_send_spi_reset_sequence()
497 return result; in st95hf_send_spi_reset_sequence()
503 int result; in st95hf_por_sequence() local
510 result = st95hf_echo_command(st95context); in st95hf_por_sequence()
514 result, nth_attempt); in st95hf_por_sequence()
516 if (!result) in st95hf_por_sequence()
534 int result = 0; in iso14443_config_fdt() local
557 result = st95hf_send_recv_cmd(st95context, in iso14443_config_fdt()
562 if (result) { in iso14443_config_fdt()
564 result); in iso14443_config_fdt()
565 return result; in iso14443_config_fdt()
569 result = secondary_configuration_type4a(st95context); in iso14443_config_fdt()
570 if (result) { in iso14443_config_fdt()
572 result); in iso14443_config_fdt()
573 return result; in iso14443_config_fdt()
577 result = st95hf_send_recv_cmd(st95context, in iso14443_config_fdt()
582 if (result) { in iso14443_config_fdt()
584 result); in iso14443_config_fdt()
585 return result; in iso14443_config_fdt()
589 result = secondary_configuration_type4b(st95context); in iso14443_config_fdt()
590 if (result) { in iso14443_config_fdt()
592 result); in iso14443_config_fdt()
593 return result; in iso14443_config_fdt()
607 int result = 0; in st95hf_handle_wtx() local
614 result = iso14443_config_fdt(stcontext, wtx_val & 0x3f); in st95hf_handle_wtx()
615 if (result) { in st95hf_handle_wtx()
617 result); in st95hf_handle_wtx()
618 return result; in st95hf_handle_wtx()
625 result = st95hf_send_recv_cmd(stcontext, in st95hf_handle_wtx()
630 if (result) in st95hf_handle_wtx()
631 dev_err(dev, "WTX response send, err = 0x%x\n", result); in st95hf_handle_wtx()
632 return result; in st95hf_handle_wtx()
641 result = iso14443_config_fdt(stcontext, val_mm); in st95hf_handle_wtx()
642 if (result) in st95hf_handle_wtx()
644 result); in st95hf_handle_wtx()
646 return result; in st95hf_handle_wtx()
653 int result = 0; in st95hf_error_handling() local
660 result = -ETIMEDOUT; in st95hf_error_handling()
662 result = -EIO; in st95hf_error_handling()
663 return result; in st95hf_error_handling()
675 result = -EIO; in st95hf_error_handling()
686 result = -EIO; in st95hf_error_handling()
691 return result; in st95hf_error_handling()
698 int result = 0; in st95hf_response_handler() local
727 result = iso14443_config_fdt(stcontext, val_mm); in st95hf_response_handler()
728 if (result) { in st95hf_response_handler()
730 result); in st95hf_response_handler()
731 return result; in st95hf_response_handler()
750 return result; in st95hf_response_handler()
769 int result = 0; in st95hf_irq_thread_handler() local
807 result = res_len; in st95hf_irq_thread_handler()
813 result = -ENODEV; in st95hf_irq_thread_handler()
819 result = st95hf_handle_wtx(stcontext, true, skb_resp->data[3]); in st95hf_irq_thread_handler()
820 if (result) in st95hf_irq_thread_handler()
828 result = st95hf_error_handling(stcontext, skb_resp, res_len); in st95hf_irq_thread_handler()
829 if (result) in st95hf_irq_thread_handler()
832 result = st95hf_response_handler(stcontext, skb_resp, res_len); in st95hf_irq_thread_handler()
833 if (result) in st95hf_irq_thread_handler()
842 result = st95hf_handle_wtx(stcontext, false, 0); in st95hf_irq_thread_handler()
843 if (result) in st95hf_irq_thread_handler()
860 skb_resp = ERR_PTR(result); in st95hf_irq_thread_handler()
1203 int result = 0; in st95hf_remove() local
1220 result = down_killable(&stcontext->exchange_lock); in st95hf_remove()
1221 if (result == -EINTR) in st95hf_remove()
1225 result = st95hf_spi_send(&stcontext->spicontext, in st95hf_remove()
1229 if (result) in st95hf_remove()
1231 "ST95HF reset failed in remove() err = %d\n", result); in st95hf_remove()