Lines Matching refs:error
143 int error; in check_plugged_state_change() local
151 error = device_attach(&mc_dev->dev); in check_plugged_state_change()
152 if (error < 0) { in check_plugged_state_change()
155 error); in check_plugged_state_change()
167 int error; in fsl_mc_obj_device_add() local
178 error = fsl_mc_device_add(obj_desc, NULL, &mc_bus_dev->dev, in fsl_mc_obj_device_add()
180 if (error < 0) in fsl_mc_obj_device_add()
245 int error; in dprc_scan_objects() local
250 error = dprc_get_obj_count(mc_bus_dev->mc_io, in dprc_scan_objects()
254 if (error < 0) { in dprc_scan_objects()
256 error); in dprc_scan_objects()
257 return error; in dprc_scan_objects()
278 error = dprc_get_obj(mc_bus_dev->mc_io, in dprc_scan_objects()
282 if (error < 0) { in dprc_scan_objects()
285 i, error); in dprc_scan_objects()
291 obj_desc->id = error; in dprc_scan_objects()
330 error = fsl_mc_populate_irq_pool(mc_bus_dev, in dprc_scan_objects()
332 if (error < 0) in dprc_scan_objects()
333 return error; in dprc_scan_objects()
362 int error = 0; in dprc_scan_container() local
371 error = dprc_scan_objects(mc_bus_dev, alloc_interrupts); in dprc_scan_container()
374 return error; in dprc_scan_container()
397 int error; in dprc_irq0_handler_thread() local
416 error = dprc_get_irq_status(mc_io, 0, mc_dev->mc_handle, 0, in dprc_irq0_handler_thread()
418 if (error < 0) { in dprc_irq0_handler_thread()
420 "dprc_get_irq_status() failed: %d\n", error); in dprc_irq0_handler_thread()
424 error = dprc_clear_irq_status(mc_io, 0, mc_dev->mc_handle, 0, in dprc_irq0_handler_thread()
426 if (error < 0) { in dprc_irq0_handler_thread()
428 "dprc_clear_irq_status() failed: %d\n", error); in dprc_irq0_handler_thread()
438 error = dprc_scan_objects(mc_dev, true); in dprc_irq0_handler_thread()
439 if (error < 0) { in dprc_irq0_handler_thread()
446 if (error != -ENXIO) { in dprc_irq0_handler_thread()
448 error); in dprc_irq0_handler_thread()
466 int error; in disable_dprc_irq() local
472 error = dprc_set_irq_enable(mc_io, 0, mc_dev->mc_handle, 0, 0); in disable_dprc_irq()
473 if (error < 0) { in disable_dprc_irq()
476 error); in disable_dprc_irq()
477 return error; in disable_dprc_irq()
483 error = dprc_set_irq_mask(mc_io, 0, mc_dev->mc_handle, 0, 0x0); in disable_dprc_irq()
484 if (error < 0) { in disable_dprc_irq()
487 error); in disable_dprc_irq()
488 return error; in disable_dprc_irq()
494 error = dprc_clear_irq_status(mc_io, 0, mc_dev->mc_handle, 0, ~0x0U); in disable_dprc_irq()
495 if (error < 0) { in disable_dprc_irq()
498 error); in disable_dprc_irq()
499 return error; in disable_dprc_irq()
516 int error; in register_dprc_irq_handler() local
523 error = devm_request_threaded_irq(&mc_dev->dev, in register_dprc_irq_handler()
530 if (error < 0) { in register_dprc_irq_handler()
533 error); in register_dprc_irq_handler()
534 return error; in register_dprc_irq_handler()
543 int error; in enable_dprc_irq() local
548 error = dprc_set_irq_mask(mc_dev->mc_io, 0, mc_dev->mc_handle, 0, in enable_dprc_irq()
550 if (error < 0) { in enable_dprc_irq()
553 error); in enable_dprc_irq()
555 return error; in enable_dprc_irq()
561 error = dprc_set_irq_enable(mc_dev->mc_io, 0, mc_dev->mc_handle, 0, 1); in enable_dprc_irq()
562 if (error < 0) { in enable_dprc_irq()
565 error); in enable_dprc_irq()
567 return error; in enable_dprc_irq()
580 int error; in dprc_setup_irq() local
582 error = fsl_mc_allocate_irqs(mc_dev); in dprc_setup_irq()
583 if (error < 0) in dprc_setup_irq()
584 return error; in dprc_setup_irq()
586 error = disable_dprc_irq(mc_dev); in dprc_setup_irq()
587 if (error < 0) in dprc_setup_irq()
590 error = register_dprc_irq_handler(mc_dev); in dprc_setup_irq()
591 if (error < 0) in dprc_setup_irq()
594 error = enable_dprc_irq(mc_dev); in dprc_setup_irq()
595 if (error < 0) in dprc_setup_irq()
602 return error; in dprc_setup_irq()
624 int error; in dprc_setup() local
644 error = fsl_create_mc_io(&mc_dev->dev, in dprc_setup()
650 if (error < 0) in dprc_setup()
651 return error; in dprc_setup()
655 error = fsl_mc_uapi_create_device_file(mc_bus); in dprc_setup()
656 if (error < 0) in dprc_setup()
670 error = dprc_open(mc_dev->mc_io, 0, mc_dev->obj_desc.id, in dprc_setup()
672 if (error < 0) { in dprc_setup()
673 dev_err(&mc_dev->dev, "dprc_open() failed: %d\n", error); in dprc_setup()
677 error = dprc_get_attributes(mc_dev->mc_io, 0, mc_dev->mc_handle, in dprc_setup()
679 if (error < 0) { in dprc_setup()
681 error); in dprc_setup()
685 error = dprc_get_api_version(mc_dev->mc_io, 0, in dprc_setup()
688 if (error < 0) { in dprc_setup()
690 error); in dprc_setup()
698 error = -ENOTSUPP; in dprc_setup()
719 return error; in dprc_setup()
735 int error; in dprc_probe() local
737 error = dprc_setup(mc_dev); in dprc_probe()
738 if (error < 0) in dprc_probe()
739 return error; in dprc_probe()
744 error = dprc_scan_container(mc_dev, true); in dprc_probe()
745 if (error < 0) in dprc_probe()
751 error = dprc_setup_irq(mc_dev); in dprc_probe()
752 if (error < 0) in dprc_probe()
762 return error; in dprc_probe()
791 int error; in dprc_cleanup() local
814 error = dprc_close(mc_dev->mc_io, 0, mc_dev->mc_handle); in dprc_cleanup()
815 if (error < 0) in dprc_cleanup()
816 dev_err(&mc_dev->dev, "dprc_close() failed: %d\n", error); in dprc_cleanup()