Lines Matching refs:api
236 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_init() local
238 __ASSERT(api->init != NULL, "Callback pointer should not be NULL"); in tcpc_init()
240 return api->init(dev); in tcpc_init()
257 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_get_cc() local
259 if (api->get_cc == NULL) { in tcpc_get_cc()
263 return api->get_cc(dev, cc1, cc2); in tcpc_get_cc()
278 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_select_rp_value() local
280 if (api->select_rp_value == NULL) { in tcpc_select_rp_value()
284 return api->select_rp_value(dev, rp); in tcpc_select_rp_value()
299 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_get_rp_value() local
301 if (api->get_rp_value == NULL) { in tcpc_get_rp_value()
305 return api->get_rp_value(dev, rp); in tcpc_get_rp_value()
319 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_set_cc() local
321 __ASSERT(api->set_cc != NULL, "Callback pointer should not be NULL"); in tcpc_set_cc()
323 return api->set_cc(dev, pull); in tcpc_set_cc()
338 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_set_vconn_cb() local
340 __ASSERT(api->set_vconn_cb != NULL, "Callback pointer should not be NULL"); in tcpc_set_vconn_cb()
342 api->set_vconn_cb(dev, vconn_cb); in tcpc_set_vconn_cb()
358 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_set_vconn_discharge_cb() local
360 __ASSERT(api->set_vconn_discharge_cb != NULL, "Callback pointer should not be NULL"); in tcpc_set_vconn_discharge_cb()
362 api->set_vconn_discharge_cb(dev, cb); in tcpc_set_vconn_discharge_cb()
380 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_vconn_discharge() local
382 if (api->vconn_discharge == NULL) { in tcpc_vconn_discharge()
386 return api->vconn_discharge(dev, enable); in tcpc_vconn_discharge()
404 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_set_vconn() local
406 if (api->set_vconn == NULL) { in tcpc_set_vconn()
410 return api->set_vconn(dev, enable); in tcpc_set_vconn()
429 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_set_roles() local
431 if (api->set_roles == NULL) { in tcpc_set_roles()
435 return api->set_roles(dev, power_role, data_role); in tcpc_set_roles()
453 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_get_rx_pending_msg() local
455 __ASSERT(api->get_rx_pending_msg != NULL, "Callback pointer should not be NULL"); in tcpc_get_rx_pending_msg()
457 return api->get_rx_pending_msg(dev, buf); in tcpc_get_rx_pending_msg()
473 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_set_rx_enable() local
475 if (api->set_rx_enable == NULL) { in tcpc_set_rx_enable()
479 return api->set_rx_enable(dev, enable); in tcpc_set_rx_enable()
493 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_set_cc_polarity() local
495 __ASSERT(api->set_cc_polarity != NULL, "Callback pointer should not be NULL"); in tcpc_set_cc_polarity()
497 return api->set_cc_polarity(dev, polarity); in tcpc_set_cc_polarity()
512 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_transmit_data() local
514 if (api->transmit_data == NULL) { in tcpc_transmit_data()
518 return api->transmit_data(dev, msg); in tcpc_transmit_data()
532 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_dump_std_reg() local
534 if (api->dump_std_reg == NULL) { in tcpc_dump_std_reg()
538 return api->dump_std_reg(dev); in tcpc_dump_std_reg()
557 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_set_alert_handler_cb() local
559 __ASSERT(api->set_alert_handler_cb != NULL, "Callback pointer should not be NULL"); in tcpc_set_alert_handler_cb()
561 return api->set_alert_handler_cb(dev, handler, data); in tcpc_set_alert_handler_cb()
578 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_get_status_register() local
580 if (api->get_status_register == NULL) { in tcpc_get_status_register()
584 return api->get_status_register(dev, reg, status); in tcpc_get_status_register()
602 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_clear_status_register() local
604 if (api->clear_status_register == NULL) { in tcpc_clear_status_register()
608 return api->clear_status_register(dev, reg, mask); in tcpc_clear_status_register()
626 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_mask_status_register() local
628 if (api->mask_status_register == NULL) { in tcpc_mask_status_register()
632 return api->mask_status_register(dev, reg, mask); in tcpc_mask_status_register()
647 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_set_debug_accessory() local
649 if (api->set_debug_accessory == NULL) { in tcpc_set_debug_accessory()
653 return api->set_debug_accessory(dev, enable); in tcpc_set_debug_accessory()
667 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_set_debug_detach() local
669 if (api->set_debug_detach == NULL) { in tcpc_set_debug_detach()
673 return api->set_debug_detach(dev); in tcpc_set_debug_detach()
688 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_set_drp_toggle() local
690 if (api->set_drp_toggle == NULL) { in tcpc_set_drp_toggle()
694 return api->set_drp_toggle(dev, enable); in tcpc_set_drp_toggle()
708 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_get_snk_ctrl() local
710 if (api->get_snk_ctrl == NULL) { in tcpc_get_snk_ctrl()
714 return api->get_snk_ctrl(dev); in tcpc_get_snk_ctrl()
727 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_set_snk_ctrl() local
729 if (api->set_snk_ctrl == NULL) { in tcpc_set_snk_ctrl()
733 return api->set_snk_ctrl(dev, enable); in tcpc_set_snk_ctrl()
747 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_get_src_ctrl() local
749 if (api->get_src_ctrl == NULL) { in tcpc_get_src_ctrl()
753 return api->get_src_ctrl(dev); in tcpc_get_src_ctrl()
766 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_set_src_ctrl() local
768 if (api->set_src_ctrl == NULL) { in tcpc_set_src_ctrl()
772 return api->set_src_ctrl(dev, enable); in tcpc_set_src_ctrl()
788 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_set_bist_test_mode() local
790 if (api->set_bist_test_mode == NULL) { in tcpc_set_bist_test_mode()
794 return api->set_bist_test_mode(dev, enable); in tcpc_set_bist_test_mode()
809 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_get_chip_info() local
811 if (api->get_chip_info == NULL) { in tcpc_get_chip_info()
815 return api->get_chip_info(dev, chip_info); in tcpc_get_chip_info()
830 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_set_low_power_mode() local
832 if (api->set_low_power_mode == NULL) { in tcpc_set_low_power_mode()
836 return api->set_low_power_mode(dev, enable); in tcpc_set_low_power_mode()
851 const struct tcpc_driver_api *api = (const struct tcpc_driver_api *)dev->api; in tcpc_sop_prime_enable() local
853 if (api->sop_prime_enable == NULL) { in tcpc_sop_prime_enable()
857 return api->sop_prime_enable(dev, enable); in tcpc_sop_prime_enable()