Lines Matching defs:port

506 	struct tcpm_port *port;  member
520 #define tcpm_port_is_sink(port) \ argument
528 #define tcpm_port_is_source(port) \ argument
534 #define tcpm_port_is_debug(port) \ argument
537 #define tcpm_port_is_audio(port) \ argument
540 #define tcpm_port_is_audio_detached(port) \ argument
544 #define tcpm_try_snk(port) \ argument
548 #define tcpm_try_src(port) \ argument
552 #define tcpm_data_role_for_source(port) \ argument
556 #define tcpm_data_role_for_sink(port) \ argument
560 #define tcpm_sink_tx_ok(port) \ argument
564 #define tcpm_wait_for_discharge(port) \ argument
567 static enum tcpm_state tcpm_default_state(struct tcpm_port *port) in tcpm_default_state()
581 static bool tcpm_port_is_disconnected(struct tcpm_port *port) in tcpm_port_is_disconnected()
597 static bool tcpm_log_full(struct tcpm_port *port) in tcpm_log_full()
604 static void _tcpm_log(struct tcpm_port *port, const char *fmt, va_list args) in _tcpm_log()
652 static void tcpm_log(struct tcpm_port *port, const char *fmt, ...) in tcpm_log()
668 static void tcpm_log_force(struct tcpm_port *port, const char *fmt, ...) in tcpm_log_force()
677 static void tcpm_log_source_caps(struct tcpm_port *port) in tcpm_log_source_caps()
740 struct tcpm_port *port = s->private; in tcpm_debug_show() local
757 static void tcpm_debugfs_init(struct tcpm_port *port) in tcpm_debugfs_init()
768 static void tcpm_debugfs_exit(struct tcpm_port *port) in tcpm_debugfs_exit()
785 static void tcpm_log(const struct tcpm_port *port, const char *fmt, ...) { } in tcpm_log()
787 static void tcpm_log_force(struct tcpm_port *port, const char *fmt, ...) { } in tcpm_log_force()
788 static void tcpm_log_source_caps(struct tcpm_port *port) { } in tcpm_log_source_caps()
789 static void tcpm_debugfs_init(const struct tcpm_port *port) { } in tcpm_debugfs_init()
790 static void tcpm_debugfs_exit(const struct tcpm_port *port) { } in tcpm_debugfs_exit()
794 static void tcpm_set_cc(struct tcpm_port *port, enum typec_cc_status cc) in tcpm_set_cc()
801 static int tcpm_enable_auto_vbus_discharge(struct tcpm_port *port, bool enable) in tcpm_enable_auto_vbus_discharge()
816 static void tcpm_apply_rc(struct tcpm_port *port) in tcpm_apply_rc()
834 static enum typec_cc_status tcpm_rp_cc(struct tcpm_port *port) in tcpm_rp_cc()
865 static void tcpm_ams_finish(struct tcpm_port *port) in tcpm_ams_finish()
882 static int tcpm_pd_transmit(struct tcpm_port *port, in tcpm_pd_transmit()
935 void tcpm_pd_transmit_complete(struct tcpm_port *port, in tcpm_pd_transmit_complete()
944 static int tcpm_mux_set(struct tcpm_port *port, int state, in tcpm_mux_set()
966 static int tcpm_set_polarity(struct tcpm_port *port, in tcpm_set_polarity()
982 static int tcpm_set_vconn(struct tcpm_port *port, bool enable) in tcpm_set_vconn()
997 static u32 tcpm_get_current_limit(struct tcpm_port *port) in tcpm_get_current_limit()
1022 static int tcpm_set_current_limit(struct tcpm_port *port, u32 max_ma, u32 mv) in tcpm_set_current_limit()
1038 static int tcpm_set_attached_state(struct tcpm_port *port, bool attached) in tcpm_set_attached_state()
1044 static int tcpm_set_roles(struct tcpm_port *port, bool attached, in tcpm_set_roles()
1097 static int tcpm_set_pwr_role(struct tcpm_port *port, enum typec_role role) in tcpm_set_pwr_role()
1117 static u32 tcpm_forge_legacy_pdo(struct tcpm_port *port, u32 pdo, enum typec_role role) in tcpm_forge_legacy_pdo()
1134 static int tcpm_pd_send_source_caps(struct tcpm_port *port) in tcpm_pd_send_source_caps()
1171 static int tcpm_pd_send_sink_caps(struct tcpm_port *port) in tcpm_pd_send_sink_caps()
1208 static void mod_tcpm_delayed_work(struct tcpm_port *port, unsigned int delay_ms) in mod_tcpm_delayed_work()
1218 static void mod_vdm_delayed_work(struct tcpm_port *port, unsigned int delay_ms) in mod_vdm_delayed_work()
1229 static void mod_enable_frs_delayed_work(struct tcpm_port *port, unsigned int delay_ms) in mod_enable_frs_delayed_work()
1239 static void mod_send_discover_delayed_work(struct tcpm_port *port, unsigned int delay_ms) in mod_send_discover_delayed_work()
1249 static void tcpm_set_state(struct tcpm_port *port, enum tcpm_state state, in tcpm_set_state()
1278 static void tcpm_set_state_cond(struct tcpm_port *port, enum tcpm_state state, in tcpm_set_state_cond()
1292 static void tcpm_queue_message(struct tcpm_port *port, in tcpm_queue_message()
1299 static bool tcpm_vdm_ams(struct tcpm_port *port) in tcpm_vdm_ams()
1321 static bool tcpm_ams_interruptible(struct tcpm_port *port) in tcpm_ams_interruptible()
1351 static int tcpm_ams_start(struct tcpm_port *port, enum tcpm_ams ams) in tcpm_ams_start()
1445 static void tcpm_queue_vdm(struct tcpm_port *port, const u32 header, in tcpm_queue_vdm()
1472 static void tcpm_queue_vdm_unlocked(struct tcpm_port *port, const u32 header, in tcpm_queue_vdm_unlocked()
1480 static void svdm_consume_identity(struct tcpm_port *port, const u32 *p, int cnt) in svdm_consume_identity()
1499 static bool svdm_consume_svids(struct tcpm_port *port, const u32 *p, int cnt) in svdm_consume_svids()
1547 static void svdm_consume_modes(struct tcpm_port *port, const u32 *p, int cnt) in svdm_consume_modes()
1574 static void tcpm_register_partner_altmodes(struct tcpm_port *port) in tcpm_register_partner_altmodes()
1595 #define supports_modal(port) PD_IDH_MODAL_SUPP((port)->partner_ident.id_header) argument
1597 static int tcpm_pd_svdm(struct tcpm_port *port, struct typec_altmode *adev, in tcpm_pd_svdm()
1793 static void tcpm_handle_vdm_request(struct tcpm_port *port, in tcpm_handle_vdm_request()
1908 static void tcpm_send_vdm(struct tcpm_port *port, u32 vid, int cmd, in tcpm_send_vdm()
1953 static void vdm_run_state_machine(struct tcpm_port *port) in vdm_run_state_machine()
2083 struct tcpm_port *port = container_of(work, struct tcpm_port, vdm_state_machine); in vdm_state_machine_work() local
2136 static enum pdo_err tcpm_caps_err(struct tcpm_port *port, const u32 *pdo, in tcpm_caps_err()
2212 static int tcpm_validate_caps(struct tcpm_port *port, const u32 *pdo, in tcpm_validate_caps()
2227 struct tcpm_port *port = typec_altmode_get_drvdata(altmode); in tcpm_altmode_enter() local
2244 struct tcpm_port *port = typec_altmode_get_drvdata(altmode); in tcpm_altmode_exit() local
2262 struct tcpm_port *port = typec_altmode_get_drvdata(altmode); in tcpm_altmode_vdm() local
2278 static inline enum tcpm_state ready_state(struct tcpm_port *port) in ready_state()
2289 static void tcpm_handle_alert(struct tcpm_port *port, const __le32 *payload, in tcpm_handle_alert()
2319 static int tcpm_set_auto_vbus_discharge_threshold(struct tcpm_port *port, in tcpm_set_auto_vbus_discharge_threshold()
2337 static void tcpm_pd_handle_state(struct tcpm_port *port, in tcpm_pd_handle_state()
2370 static void tcpm_pd_handle_msg(struct tcpm_port *port, in tcpm_pd_handle_msg()
2402 static int tcpm_register_source_caps(struct tcpm_port *port) in tcpm_register_source_caps()
2430 static int tcpm_register_sink_caps(struct tcpm_port *port) in tcpm_register_sink_caps()
2453 static void tcpm_pd_data_request(struct tcpm_port *port, in tcpm_pd_data_request()
2636 static void tcpm_pps_complete(struct tcpm_port *port, int result) in tcpm_pps_complete()
2645 static void tcpm_pd_ctrl_request(struct tcpm_port *port, in tcpm_pd_ctrl_request()
2914 static void tcpm_pd_ext_msg_request(struct tcpm_port *port, in tcpm_pd_ext_msg_request()
2979 struct tcpm_port *port = event->port; in tcpm_pd_rx_handler() local
3027 void tcpm_pd_receive(struct tcpm_port *port, const struct pd_message *msg) in tcpm_pd_receive()
3042 static int tcpm_pd_send_control(struct tcpm_port *port, in tcpm_pd_send_control()
3061 static bool tcpm_send_queued_message(struct tcpm_port *port) in tcpm_send_queued_message()
3119 static int tcpm_pd_check_request(struct tcpm_port *port) in tcpm_pd_check_request()
3179 static int tcpm_pd_select_pdo(struct tcpm_port *port, int *sink_pdo, in tcpm_pd_select_pdo()
3276 static unsigned int tcpm_pd_select_pps_apdo(struct tcpm_port *port) in tcpm_pd_select_pps_apdo()
3323 static int tcpm_pd_build_request(struct tcpm_port *port, u32 *rdo) in tcpm_pd_build_request()
3403 static int tcpm_pd_send_request(struct tcpm_port *port) in tcpm_pd_send_request()
3430 static int tcpm_pd_build_pps_request(struct tcpm_port *port, u32 *rdo) in tcpm_pd_build_pps_request()
3490 static int tcpm_pd_send_pps_request(struct tcpm_port *port) in tcpm_pd_send_pps_request()
3514 static int tcpm_set_vbus(struct tcpm_port *port, bool enable) in tcpm_set_vbus()
3531 static int tcpm_set_charge(struct tcpm_port *port, bool charge) in tcpm_set_charge()
3550 static bool tcpm_start_toggling(struct tcpm_port *port, enum typec_cc_status cc) in tcpm_start_toggling()
3562 static int tcpm_init_vbus(struct tcpm_port *port) in tcpm_init_vbus()
3572 static int tcpm_init_vconn(struct tcpm_port *port) in tcpm_init_vconn()
3581 static void tcpm_typec_connect(struct tcpm_port *port) in tcpm_typec_connect()
3607 static int tcpm_src_attach(struct tcpm_port *port) in tcpm_src_attach()
3669 static void tcpm_typec_disconnect(struct tcpm_port *port) in tcpm_typec_disconnect()
3681 static void tcpm_unregister_altmodes(struct tcpm_port *port) in tcpm_unregister_altmodes()
3694 static void tcpm_set_partner_usb_comm_capable(struct tcpm_port *port, bool capable) in tcpm_set_partner_usb_comm_capable()
3702 static void tcpm_reset_port(struct tcpm_port *port) in tcpm_reset_port()
3746 static void tcpm_detach(struct tcpm_port *port) in tcpm_detach()
3762 static void tcpm_src_detach(struct tcpm_port *port) in tcpm_src_detach()
3767 static int tcpm_snk_attach(struct tcpm_port *port) in tcpm_snk_attach()
3795 static void tcpm_snk_detach(struct tcpm_port *port) in tcpm_snk_detach()
3800 static int tcpm_acc_attach(struct tcpm_port *port) in tcpm_acc_attach()
3821 static void tcpm_acc_detach(struct tcpm_port *port) in tcpm_acc_detach()
3826 static inline enum tcpm_state hard_reset_state(struct tcpm_port *port) in hard_reset_state()
3839 static inline enum tcpm_state unattached_state(struct tcpm_port *port) in unattached_state()
3853 static void tcpm_swap_complete(struct tcpm_port *port, int result) in tcpm_swap_complete()
3890 static void tcpm_set_initial_svdm_version(struct tcpm_port *port) in tcpm_set_initial_svdm_version()
3916 static void run_state_machine(struct tcpm_port *port) in run_state_machine()
4923 struct tcpm_port *port = container_of(work, struct tcpm_port, state_machine); in tcpm_state_machine_work() local
4958 static void _tcpm_cc_change(struct tcpm_port *port, enum typec_cc_status cc1, in _tcpm_cc_change()
5167 static void _tcpm_pd_vbus_on(struct tcpm_port *port) in _tcpm_pd_vbus_on()
5257 static void _tcpm_pd_vbus_off(struct tcpm_port *port) in _tcpm_pd_vbus_off()
5361 static void _tcpm_pd_vbus_vsafe0v(struct tcpm_port *port) in _tcpm_pd_vbus_vsafe0v()
5410 static void _tcpm_pd_hard_reset(struct tcpm_port *port) in _tcpm_pd_hard_reset()
5442 struct tcpm_port *port = container_of(work, struct tcpm_port, in tcpm_pd_event_handler() local
5519 void tcpm_cc_change(struct tcpm_port *port) in tcpm_cc_change()
5528 void tcpm_vbus_change(struct tcpm_port *port) in tcpm_vbus_change()
5537 void tcpm_pd_hard_reset(struct tcpm_port *port) in tcpm_pd_hard_reset()
5546 void tcpm_sink_frs(struct tcpm_port *port) in tcpm_sink_frs()
5555 void tcpm_sourcing_vbus(struct tcpm_port *port) in tcpm_sourcing_vbus()
5564 void tcpm_port_clean(struct tcpm_port *port) in tcpm_port_clean()
5573 bool tcpm_port_is_toggling(struct tcpm_port *port) in tcpm_port_is_toggling()
5581 struct tcpm_port *port = container_of(work, struct tcpm_port, enable_frs); in tcpm_enable_frs_work() local
5613 struct tcpm_port *port = container_of(work, struct tcpm_port, send_discover_work); in tcpm_send_discover_work() local
5639 struct tcpm_port *port = typec_get_drvdata(p); in tcpm_dr_set() local
5711 struct tcpm_port *port = typec_get_drvdata(p); in tcpm_pr_set() local
5760 struct tcpm_port *port = typec_get_drvdata(p); in tcpm_vconn_set() local
5805 struct tcpm_port *port = typec_get_drvdata(p); in tcpm_try_role() local
5821 static int tcpm_pps_set_op_curr(struct tcpm_port *port, u16 req_op_curr) in tcpm_pps_set_op_curr()
5882 static int tcpm_pps_set_out_volt(struct tcpm_port *port, u16 req_out_volt) in tcpm_pps_set_out_volt()
5938 static int tcpm_pps_activate(struct tcpm_port *port, bool activate) in tcpm_pps_activate()
5996 static void tcpm_init(struct tcpm_port *port) in tcpm_init()
6045 struct tcpm_port *port = typec_get_drvdata(p); in tcpm_port_type_set() local
6078 void tcpm_tcpc_reset(struct tcpm_port *port) in tcpm_tcpc_reset()
6087 static void tcpm_port_unregister_pd(struct tcpm_port *port) in tcpm_port_unregister_pd()
6097 static int tcpm_port_register_pd(struct tcpm_port *port) in tcpm_port_register_pd()
6149 static int tcpm_fw_get_caps(struct tcpm_port *port, in tcpm_fw_get_caps()
6288 static int tcpm_psy_get_online(struct tcpm_port *port, in tcpm_psy_get_online()
6303 static int tcpm_psy_get_voltage_min(struct tcpm_port *port, in tcpm_psy_get_voltage_min()
6314 static int tcpm_psy_get_voltage_max(struct tcpm_port *port, in tcpm_psy_get_voltage_max()
6325 static int tcpm_psy_get_voltage_now(struct tcpm_port *port, in tcpm_psy_get_voltage_now()
6333 static int tcpm_psy_get_current_max(struct tcpm_port *port, in tcpm_psy_get_current_max()
6344 static int tcpm_psy_get_current_now(struct tcpm_port *port, in tcpm_psy_get_current_now()
6352 static int tcpm_psy_get_input_power_limit(struct tcpm_port *port, in tcpm_psy_get_input_power_limit()
6377 struct tcpm_port *port = power_supply_get_drvdata(psy); in tcpm_psy_get_prop() local
6413 static int tcpm_psy_set_online(struct tcpm_port *port, in tcpm_psy_set_online()
6437 struct tcpm_port *port = power_supply_get_drvdata(psy); in tcpm_psy_set_prop() local
6489 static int devm_tcpm_psy_register(struct tcpm_port *port) in devm_tcpm_psy_register()
6525 struct tcpm_port *port = container_of(timer, struct tcpm_port, state_machine_timer); in state_machine_timer_handler() local
6534 struct tcpm_port *port = container_of(timer, struct tcpm_port, vdm_state_machine_timer); in vdm_state_machine_timer_handler() local
6543 struct tcpm_port *port = container_of(timer, struct tcpm_port, enable_frs_timer); in enable_frs_timer_handler() local
6552 struct tcpm_port *port = container_of(timer, struct tcpm_port, send_discover_timer); in send_discover_timer_handler() local
6561 struct tcpm_port *port; in tcpm_register_port() local
6671 void tcpm_unregister_port(struct tcpm_port *port) in tcpm_unregister_port()