| H A D | tcpm.c | 309 * @min_volt: Actual min voltage at the local port 310 * @req_min_volt: Requested min voltage to the port partner 311 * @max_volt: Actual max voltage at the local port 312 * @req_max_volt: Requested max voltage to the port partner 313 * @max_curr: Actual max current at the local port 314 * @req_max_curr: Requested max current of the port partner 315 * @req_out_volt: Requested output voltage to the port partner 316 * @req_op_curr: Requested operating current to the port partner 351 * @req_op_curr_ma: Requested operating current to the port partner acting as source 352 * @req_out_volt_mv: Requested output voltage to the port partne 724 struct tcpm_port *port; global() member 731 struct tcpm_port *port; global() member 749 tcpm_port_is_sink(port) global() argument 756 tcpm_port_is_source(port) global() argument 762 tcpm_port_is_debug_source(port) global() argument 765 tcpm_port_is_debug_sink(port) global() argument 768 tcpm_port_is_debug(port) global() argument 771 tcpm_port_is_audio(port) global() argument 774 tcpm_port_is_audio_detached(port) global() argument 778 tcpm_try_snk(port) global() argument 782 tcpm_try_src(port) global() argument 786 tcpm_data_role_for_source(port) global() argument 790 tcpm_data_role_for_sink(port) global() argument 794 tcpm_sink_tx_ok(port) global() argument 798 tcpm_wait_for_discharge(port) global() argument 804 tcpm_default_state(struct tcpm_port * port) tcpm_default_state() argument 818 tcpm_port_is_disconnected(struct tcpm_port * port) tcpm_port_is_disconnected() argument 834 tcpm_log_full(struct tcpm_port * port) tcpm_log_full() argument 841 _tcpm_log(struct tcpm_port * port,const char * fmt,va_list args) _tcpm_log() argument 889 tcpm_log(struct tcpm_port * port,const char * fmt,...) tcpm_log() argument 905 tcpm_log_force(struct tcpm_port * port,const char * fmt,...) tcpm_log_force() argument 914 tcpm_log_source_caps(struct tcpm_port * port) tcpm_log_source_caps() argument 990 struct tcpm_port *port = s->private; tcpm_debug_show() local 1007 tcpm_debugfs_init(struct tcpm_port * port) tcpm_debugfs_init() argument 1018 tcpm_debugfs_exit(struct tcpm_port * port) tcpm_debugfs_exit() argument 1035 tcpm_log(const struct tcpm_port * port,const char * fmt,...) tcpm_log() argument 1037 tcpm_log_force(struct tcpm_port * port,const char * fmt,...) tcpm_log_force() argument 1038 tcpm_log_source_caps(struct tcpm_port * port) tcpm_log_source_caps() argument 1039 tcpm_debugfs_init(const struct tcpm_port * port) tcpm_debugfs_init() argument 1040 tcpm_debugfs_exit(const struct tcpm_port * port) tcpm_debugfs_exit() argument 1044 tcpm_set_cc(struct tcpm_port * port,enum typec_cc_status cc) tcpm_set_cc() argument 1051 tcpm_enable_auto_vbus_discharge(struct tcpm_port * port,bool enable) tcpm_enable_auto_vbus_discharge() argument 1066 tcpm_apply_rc(struct tcpm_port * port) tcpm_apply_rc() argument 1084 tcpm_rp_cc(struct tcpm_port * port) tcpm_rp_cc() argument 1115 tcpm_ams_finish(struct tcpm_port * port) tcpm_ams_finish() argument 1132 tcpm_pd_transmit(struct tcpm_port * port,enum tcpm_transmit_type tx_sop_type,const struct pd_message * msg) tcpm_pd_transmit() argument 1206 tcpm_pd_transmit_complete(struct tcpm_port * port,enum tcpm_transmit_status status) tcpm_pd_transmit_complete() argument 1215 tcpm_mux_set(struct tcpm_port * port,int state,enum usb_role usb_role,enum typec_orientation orientation) tcpm_mux_set() argument 1237 tcpm_set_polarity(struct tcpm_port * port,enum typec_cc_polarity polarity) tcpm_set_polarity() argument 1253 tcpm_set_vconn(struct tcpm_port * port,bool enable) tcpm_set_vconn() argument 1268 tcpm_get_current_limit(struct tcpm_port * port) tcpm_get_current_limit() argument 1293 tcpm_set_current_limit(struct tcpm_port * port,u32 max_ma,u32 mv) tcpm_set_current_limit() argument 1309 tcpm_set_attached_state(struct tcpm_port * port,bool attached) tcpm_set_attached_state() argument 1315 tcpm_set_roles(struct tcpm_port * port,bool attached,int state,enum typec_role role,enum typec_data_role data) tcpm_set_roles() argument 1374 tcpm_set_pwr_role(struct tcpm_port * port,enum typec_role role) tcpm_set_pwr_role() argument 1394 tcpm_forge_legacy_pdo(struct tcpm_port * port,u32 pdo,enum typec_role role) tcpm_forge_legacy_pdo() argument 1411 tcpm_pd_send_revision(struct tcpm_port * port) tcpm_pd_send_revision() argument 1429 tcpm_pd_send_source_caps(struct tcpm_port * port) tcpm_pd_send_source_caps() argument 1466 tcpm_pd_send_sink_caps(struct tcpm_port * port) tcpm_pd_send_sink_caps() argument 1503 tcpm_get_fixed_batt(struct tcpm_port * port) tcpm_get_fixed_batt() argument 1517 tcpm_pd_send_sink_cap_ext(struct tcpm_port * port) tcpm_pd_send_sink_cap_ext() argument 1587 tcpm_pd_send_batt_status(struct tcpm_port * port) tcpm_pd_send_batt_status() argument 1660 tcpm_pd_send_batt_cap(struct tcpm_port * port) tcpm_pd_send_batt_cap() argument 1725 mod_tcpm_delayed_work(struct tcpm_port * port,unsigned int delay_ms) mod_tcpm_delayed_work() argument 1735 mod_vdm_delayed_work(struct tcpm_port * port,unsigned int delay_ms) mod_vdm_delayed_work() argument 1746 mod_enable_frs_delayed_work(struct tcpm_port * port,unsigned int delay_ms) mod_enable_frs_delayed_work() argument 1756 mod_vdm_discovery_cancel_delayed_work(struct tcpm_port * port) mod_vdm_discovery_cancel_delayed_work() argument 1762 mod_vdm_discovery_delayed_work(struct tcpm_port * port,unsigned int delay_ms) mod_vdm_discovery_delayed_work() argument 1772 tcpm_set_state(struct tcpm_port * port,enum tcpm_state state,unsigned int delay_ms) tcpm_set_state() argument 1801 tcpm_set_state_cond(struct tcpm_port * port,enum tcpm_state state,unsigned int delay_ms) tcpm_set_state_cond() argument 1815 tcpm_queue_message(struct tcpm_port * port,enum pd_msg_request message) tcpm_queue_message() argument 1822 tcpm_vdm_ams(struct tcpm_port * port) tcpm_vdm_ams() argument 1844 tcpm_ams_interruptible(struct tcpm_port * port) tcpm_ams_interruptible() argument 1874 tcpm_ams_start(struct tcpm_port * port,enum tcpm_ams ams) tcpm_ams_start() argument 1968 tcpm_queue_vdm(struct tcpm_port * port,const u32 header,const u32 * data,int cnt,enum tcpm_transmit_type tx_sop_type) tcpm_queue_vdm() argument 2000 struct tcpm_port *port = event->port; tcpm_queue_vdm_work() local 2015 tcpm_queue_vdm_unlocked(struct tcpm_port * port,const u32 header,const u32 * data,int cnt,enum tcpm_transmit_type tx_sop_type) tcpm_queue_vdm_unlocked() argument 2047 svdm_consume_identity(struct tcpm_port * port,const u32 * p,int cnt) svdm_consume_identity() argument 2069 svdm_consume_identity_sop_prime(struct tcpm_port * port,const u32 * p,int cnt) svdm_consume_identity_sop_prime() argument 2129 svdm_consume_svids(struct tcpm_port * port,const u32 * p,int cnt,enum tcpm_transmit_type rx_sop_type) svdm_consume_svids() argument 2179 svdm_consume_modes(struct tcpm_port * port,const u32 * p,int cnt,enum tcpm_transmit_type rx_sop_type) svdm_consume_modes() argument 2222 tcpm_register_partner_altmodes(struct tcpm_port * port) tcpm_register_partner_altmodes() argument 2243 tcpm_register_plug_altmodes(struct tcpm_port * port) tcpm_register_plug_altmodes() argument 2264 supports_modal(port) global() argument 2265 supports_modal_cable(port) global() argument 2266 supports_host(port) global() argument 2272 tcpm_can_communicate_sop_prime(struct tcpm_port * port) tcpm_can_communicate_sop_prime() argument 2319 tcpm_attempt_vconn_swap_discovery(struct tcpm_port * port) tcpm_attempt_vconn_swap_discovery() argument 2344 tcpm_cable_vdm_supported(struct tcpm_port * port) tcpm_cable_vdm_supported() argument 2352 tcpm_update_vdm_discovery_state(struct tcpm_port * port,enum vdm_discovery_states new_state) tcpm_update_vdm_discovery_state() argument 2365 tcpm_handle_discover_mode(struct tcpm_port * port,u32 * response,enum tcpm_transmit_type rx_sop_type,enum tcpm_transmit_type * response_tx_sop_type) tcpm_handle_discover_mode() argument 2419 tcpm_pd_svdm(struct tcpm_port * port,struct typec_altmode * adev,const u32 * p,int cnt,u32 * response,enum adev_actions * adev_action,enum tcpm_transmit_type rx_sop_type,enum tcpm_transmit_type * response_tx_sop_type) tcpm_pd_svdm() argument 2778 tcpm_handle_vdm_request(struct tcpm_port * port,const __le32 * payload,int cnt,enum tcpm_transmit_type rx_sop_type) tcpm_handle_vdm_request() argument 2944 vdm_run_state_machine(struct tcpm_port * port) vdm_run_state_machine() argument 3126 struct tcpm_port *port = container_of(work, struct tcpm_port, vdm_state_machine); vdm_state_machine_work() local 3179 tcpm_caps_err(struct tcpm_port * port,const u32 * pdo,unsigned int nr_pdo) tcpm_caps_err() argument 3255 tcpm_validate_caps(struct tcpm_port * port,const u32 * pdo,unsigned int nr_pdo) tcpm_validate_caps() argument 3270 struct tcpm_port *port = typec_altmode_get_drvdata(altmode); tcpm_altmode_enter() local 3286 struct tcpm_port *port = typec_altmode_get_drvdata(altmode); tcpm_altmode_exit() local 3303 struct tcpm_port *port = typec_altmode_get_drvdata(altmode); tcpm_altmode_vdm() local 3318 struct tcpm_port *port = typec_altmode_get_drvdata(altmode); tcpm_cable_altmode_enter() local 3334 struct tcpm_port *port = typec_altmode_get_drvdata(altmode); tcpm_cable_altmode_exit() local 3351 struct tcpm_port *port = typec_altmode_get_drvdata(altmode); tcpm_cable_altmode_vdm() local 3365 ready_state(struct tcpm_port * port) ready_state() argument 3377 tcpm_handle_alert(struct tcpm_port * port,const __le32 * payload,int cnt) tcpm_handle_alert() argument 3407 tcpm_set_auto_vbus_discharge_threshold(struct tcpm_port * port,enum typec_pwr_opmode mode,bool pps_active,u32 requested_vbus_voltage) tcpm_set_auto_vbus_discharge_threshold() argument 3427 tcpm_pd_handle_state(struct tcpm_port * port,enum tcpm_state state,enum tcpm_ams ams,unsigned int delay_ms) tcpm_pd_handle_state() argument 3460 tcpm_pd_handle_msg(struct tcpm_port * port,enum pd_msg_request message,enum tcpm_ams ams) tcpm_pd_handle_msg() argument 3492 tcpm_register_source_caps(struct tcpm_port * port) tcpm_register_source_caps() argument 3520 tcpm_register_sink_caps(struct tcpm_port * port) tcpm_register_sink_caps() argument 3543 tcpm_pd_data_request(struct tcpm_port * port,const struct pd_message * msg,enum tcpm_transmit_type rx_sop_type) tcpm_pd_data_request() argument 3735 tcpm_aug_supply_req_complete(struct tcpm_port * port,int result) tcpm_aug_supply_req_complete() argument 3744 tcpm_pd_ctrl_request(struct tcpm_port * port,const struct pd_message * msg,enum tcpm_transmit_type rx_sop_type) tcpm_pd_ctrl_request() argument 4074 tcpm_pd_ext_msg_request(struct tcpm_port * port,const struct pd_message * msg) tcpm_pd_ext_msg_request() argument 4156 struct tcpm_port *port = event->port; tcpm_pd_rx_handler() local 4223 tcpm_pd_receive(struct tcpm_port * port,const struct pd_message * msg,enum tcpm_transmit_type rx_sop_type) tcpm_pd_receive() argument 4240 tcpm_pd_send_control(struct tcpm_port * port,enum pd_ctrl_msg_type type,enum tcpm_transmit_type tx_sop_type) tcpm_pd_send_control() argument 4282 tcpm_send_queued_message(struct tcpm_port * port) tcpm_send_queued_message() argument 4374 tcpm_pd_check_request(struct tcpm_port * port) tcpm_pd_check_request() argument 4434 tcpm_pd_select_pdo(struct tcpm_port * port,int * sink_pdo,int * src_pdo) tcpm_pd_select_pdo() argument 4552 tcpm_pd_select_pps_apdo(struct tcpm_port * port) tcpm_pd_select_pps_apdo() argument 4599 tcpm_pd_select_spr_avs_apdo(struct tcpm_port * port) tcpm_pd_select_spr_avs_apdo() argument 4681 tcpm_pd_build_request(struct tcpm_port * port,u32 * rdo) tcpm_pd_build_request() argument 4761 tcpm_pd_send_request(struct tcpm_port * port) tcpm_pd_send_request() argument 4788 tcpm_pd_build_pps_request(struct tcpm_port * port,u32 * rdo) tcpm_pd_build_pps_request() argument 4848 tcpm_pd_build_spr_avs_request(struct tcpm_port * port,u32 * rdo) tcpm_pd_build_spr_avs_request() argument 4901 tcpm_pd_send_aug_supply_request(struct tcpm_port * port,enum aug_req_type type) tcpm_pd_send_aug_supply_request() argument 4933 tcpm_set_vbus(struct tcpm_port * port,bool enable) tcpm_set_vbus() argument 4950 tcpm_set_charge(struct tcpm_port * port,bool charge) tcpm_set_charge() argument 4969 tcpm_start_toggling(struct tcpm_port * port,enum typec_cc_status cc) tcpm_start_toggling() argument 4981 tcpm_init_vbus(struct tcpm_port * port) tcpm_init_vbus() argument 4991 tcpm_init_vconn(struct tcpm_port * port) tcpm_init_vconn() argument 5000 tcpm_typec_connect(struct tcpm_port * port) tcpm_typec_connect() argument 5026 tcpm_src_attach(struct tcpm_port * port) tcpm_src_attach() argument 5089 tcpm_typec_disconnect(struct tcpm_port * port) tcpm_typec_disconnect() argument 5110 tcpm_unregister_altmodes(struct tcpm_port * port) tcpm_unregister_altmodes() argument 5129 tcpm_set_partner_usb_comm_capable(struct tcpm_port * port,bool capable) tcpm_set_partner_usb_comm_capable() argument 5137 tcpm_partner_source_caps_reset(struct tcpm_port * port) tcpm_partner_source_caps_reset() argument 5145 tcpm_reset_port(struct tcpm_port * port) tcpm_reset_port() argument 5191 tcpm_detach(struct tcpm_port * port) tcpm_detach() argument 5207 tcpm_src_detach(struct tcpm_port * port) tcpm_src_detach() argument 5212 tcpm_snk_attach(struct tcpm_port * port) tcpm_snk_attach() argument 5241 tcpm_snk_detach(struct tcpm_port * port) tcpm_snk_detach() argument 5246 tcpm_acc_attach(struct tcpm_port * port) tcpm_acc_attach() argument 5279 tcpm_acc_detach(struct tcpm_port * port) tcpm_acc_detach() argument 5284 hard_reset_state(struct tcpm_port * port) hard_reset_state() argument 5298 unattached_state(struct tcpm_port * port) unattached_state() argument 5312 tcpm_swap_complete(struct tcpm_port * port,int result) tcpm_swap_complete() argument 5349 tcpm_set_initial_svdm_version(struct tcpm_port * port) tcpm_set_initial_svdm_version() argument 5375 tcpm_set_initial_negotiated_rev(struct tcpm_port * port) tcpm_set_initial_negotiated_rev() argument 5394 run_state_machine(struct tcpm_port * port) run_state_machine() argument 6545 struct tcpm_port *port = container_of(work, struct tcpm_port, state_machine); tcpm_state_machine_work() local 6580 _tcpm_cc_change(struct tcpm_port * port,enum typec_cc_status cc1,enum typec_cc_status cc2) _tcpm_cc_change() argument 6797 _tcpm_pd_vbus_on(struct tcpm_port * port) _tcpm_pd_vbus_on() argument 6887 _tcpm_pd_vbus_off(struct tcpm_port * port) _tcpm_pd_vbus_off() argument 6991 _tcpm_pd_vbus_vsafe0v(struct tcpm_port * port) _tcpm_pd_vbus_vsafe0v() argument 7040 _tcpm_pd_hard_reset(struct tcpm_port * port) _tcpm_pd_hard_reset() argument 7072 struct tcpm_port *port = container_of(work, struct tcpm_port, tcpm_pd_event_handler() local 7169 tcpm_cc_change(struct tcpm_port * port) tcpm_cc_change() argument 7178 tcpm_vbus_change(struct tcpm_port * port) tcpm_vbus_change() argument 7187 tcpm_pd_hard_reset(struct tcpm_port * port) tcpm_pd_hard_reset() argument 7196 tcpm_sink_frs(struct tcpm_port * port) tcpm_sink_frs() argument 7205 tcpm_sourcing_vbus(struct tcpm_port * port) tcpm_sourcing_vbus() argument 7214 tcpm_port_clean(struct tcpm_port * port) tcpm_port_clean() argument 7223 tcpm_port_is_toggling(struct tcpm_port * port) tcpm_port_is_toggling() argument 7229 tcpm_port_error_recovery(struct tcpm_port * port) tcpm_port_error_recovery() argument 7240 struct tcpm_port *port = container_of(work, struct tcpm_port, enable_frs); tcpm_enable_frs_work() local 7273 struct tcpm_port *port = container_of(work, struct tcpm_port, vdm_discovery_work); tcpm_vdm_discovery_work() local 7432 struct tcpm_port *port = typec_get_drvdata(p); tcpm_dr_set() local 7504 struct tcpm_port *port = typec_get_drvdata(p); tcpm_pr_set() local 7553 struct tcpm_port *port = typec_get_drvdata(p); tcpm_vconn_set() local 7598 struct tcpm_port *port = typec_get_drvdata(p); tcpm_try_role() local 7614 tcpm_aug_set_op_curr(struct tcpm_port * port,u16 req_op_curr_ma) tcpm_aug_set_op_curr() argument 7680 tcpm_aug_set_out_volt(struct tcpm_port * port,u16 req_out_volt_mv) tcpm_aug_set_out_volt() argument 7743 tcpm_pps_activate(struct tcpm_port * port,bool activate) tcpm_pps_activate() argument 7801 tcpm_spr_avs_activate(struct tcpm_port * port,bool activate) tcpm_spr_avs_activate() argument 7865 tcpm_init(struct tcpm_port * port) tcpm_init() argument 7914 struct tcpm_port *port = typec_get_drvdata(p); tcpm_port_type_set() local 7939 tcpm_find_pd_data(struct tcpm_port * port,struct usb_power_delivery * pd) tcpm_find_pd_data() argument 7953 struct tcpm_port *port = typec_get_drvdata(p); tcpm_pd_get() local 7960 struct tcpm_port *port = typec_get_drvdata(p); tcpm_pd_set() local 8061 tcpm_tcpc_reset(struct tcpm_port * port) tcpm_tcpc_reset() argument 8070 tcpm_port_unregister_pd(struct tcpm_port * port) tcpm_port_unregister_pd() argument 8086 tcpm_port_register_pd(struct tcpm_port * port) tcpm_port_register_pd() argument 8137 tcpm_fw_get_timings(struct tcpm_port * port,struct fwnode_handle * fwnode) tcpm_fw_get_timings() argument 8165 tcpm_fw_get_pd_ident(struct tcpm_port * port) tcpm_fw_get_pd_ident() argument 8185 tcpm_parse_snk_pdos(struct tcpm_port * port) tcpm_parse_snk_pdos() argument 8241 tcpm_fw_get_sink_caps_ext(struct tcpm_port * port,struct fwnode_handle * fwnode) tcpm_fw_get_sink_caps_ext() argument 8288 tcpm_fw_get_caps(struct tcpm_port * port,struct fwnode_handle * fwnode) tcpm_fw_get_caps() argument 8472 tcpm_fw_get_snk_vdos(struct tcpm_port * port,struct fwnode_handle * fwnode) tcpm_fw_get_snk_vdos() argument 8511 tcpm_fw_get_pd_revision(struct tcpm_port * port,struct fwnode_handle * fwnode) tcpm_fw_get_pd_revision() argument 8552 tcpm_psy_get_online(struct tcpm_port * port,union power_supply_propval * val) tcpm_psy_get_online() argument 8569 tcpm_psy_get_voltage_min(struct tcpm_port * port,union power_supply_propval * val) tcpm_psy_get_voltage_min() argument 8582 tcpm_psy_get_voltage_max(struct tcpm_port * port,union power_supply_propval * val) tcpm_psy_get_voltage_max() argument 8595 tcpm_psy_get_voltage_now(struct tcpm_port * port,union power_supply_propval * val) tcpm_psy_get_voltage_now() argument 8603 tcpm_psy_get_current_max(struct tcpm_port * port,union power_supply_propval * val) tcpm_psy_get_current_max() argument 8616 tcpm_psy_get_current_now(struct tcpm_port * port,union power_supply_propval * val) tcpm_psy_get_current_now() argument 8624 tcpm_psy_get_input_power_limit(struct tcpm_port * port,union power_supply_propval * val) tcpm_psy_get_input_power_limit() argument 8649 struct tcpm_port *port = power_supply_get_drvdata(psy); tcpm_psy_get_prop() local 8685 tcpm_disable_pps_avs(struct tcpm_port * port) tcpm_disable_pps_avs() argument 8697 tcpm_psy_set_online(struct tcpm_port * port,const union power_supply_propval * val) tcpm_psy_set_online() argument 8733 struct tcpm_port *port = power_supply_get_drvdata(psy); tcpm_psy_set_prop() local 8776 devm_tcpm_psy_register(struct tcpm_port * port) devm_tcpm_psy_register() argument 8815 struct tcpm_port *port = container_of(timer, struct tcpm_port, state_machine_timer); state_machine_timer_handler() local 8824 struct tcpm_port *port = container_of(timer, struct tcpm_port, vdm_state_machine_timer); vdm_state_machine_timer_handler() local 8833 struct tcpm_port *port = container_of(timer, struct tcpm_port, enable_frs_timer); enable_frs_timer_handler() local 8842 struct tcpm_port *port = container_of(timer, struct tcpm_port, vdm_discovery_timer); vdm_discovery_timer_handler() local 8851 struct tcpm_port *port; tcpm_register_port() local 8974 tcpm_unregister_port(struct tcpm_port * port) tcpm_unregister_port() argument [all...] |