Lines Matching refs:tb_switch
179 struct tb_switch { struct
276 struct tb_switch *sw;
497 int (*runtime_suspend_switch)(struct tb_switch *sw);
498 int (*runtime_resume_switch)(struct tb_switch *sw);
503 int (*disapprove_switch)(struct tb *tb, struct tb_switch *sw);
504 int (*approve_switch)(struct tb *tb, struct tb_switch *sw);
505 int (*add_switch_key)(struct tb *tb, struct tb_switch *sw);
506 int (*challenge_switch_key)(struct tb *tb, struct tb_switch *sw,
515 int (*usb4_switch_op)(struct tb_switch *sw, u16 opcode, u32 *metadata,
518 int (*usb4_switch_nvm_authenticate_status)(struct tb_switch *sw,
541 static inline struct tb_port *tb_upstream_port(struct tb_switch *sw) in tb_upstream_port()
559 static inline u64 tb_route(const struct tb_switch *sw) in tb_route()
564 static inline struct tb_port *tb_port_at(u64 route, struct tb_switch *sw) in tb_port_at()
632 static inline int tb_sw_read(struct tb_switch *sw, void *buffer, in tb_sw_read()
646 static inline int tb_sw_write(struct tb_switch *sw, const void *buffer, in tb_sw_write()
696 const struct tb_switch *__sw = (sw); \
744 int tb_domain_disapprove_switch(struct tb *tb, struct tb_switch *sw);
745 int tb_domain_approve_switch(struct tb *tb, struct tb_switch *sw);
746 int tb_domain_approve_switch_key(struct tb *tb, struct tb_switch *sw);
747 int tb_domain_challenge_switch_key(struct tb *tb, struct tb_switch *sw);
790 int tb_switch_nvm_read(struct tb_switch *sw, unsigned int address, void *buf,
792 struct tb_switch *tb_switch_alloc(struct tb *tb, struct device *parent,
794 struct tb_switch *tb_switch_alloc_safe_mode(struct tb *tb,
796 int tb_switch_configure(struct tb_switch *sw);
797 int tb_switch_add(struct tb_switch *sw);
798 void tb_switch_remove(struct tb_switch *sw);
799 void tb_switch_suspend(struct tb_switch *sw, bool runtime);
800 int tb_switch_resume(struct tb_switch *sw);
801 int tb_switch_reset(struct tb_switch *sw);
802 int tb_switch_wait_for_bit(struct tb_switch *sw, u32 offset, u32 bit,
804 void tb_sw_set_unplugged(struct tb_switch *sw);
805 struct tb_port *tb_switch_find_port(struct tb_switch *sw,
807 struct tb_switch *tb_switch_find_by_link_depth(struct tb *tb, u8 link,
809 struct tb_switch *tb_switch_find_by_uuid(struct tb *tb, const uuid_t *uuid);
810 struct tb_switch *tb_switch_find_by_route(struct tb *tb, u64 route);
823 static inline struct tb_switch *tb_switch_get(struct tb_switch *sw) in tb_switch_get()
830 static inline void tb_switch_put(struct tb_switch *sw) in tb_switch_put()
840 static inline struct tb_switch *tb_to_switch(const struct device *dev) in tb_to_switch()
843 return container_of(dev, struct tb_switch, dev); in tb_to_switch()
847 static inline struct tb_switch *tb_switch_parent(struct tb_switch *sw) in tb_switch_parent()
852 static inline bool tb_switch_is_light_ridge(const struct tb_switch *sw) in tb_switch_is_light_ridge()
858 static inline bool tb_switch_is_eagle_ridge(const struct tb_switch *sw) in tb_switch_is_eagle_ridge()
864 static inline bool tb_switch_is_cactus_ridge(const struct tb_switch *sw) in tb_switch_is_cactus_ridge()
876 static inline bool tb_switch_is_falcon_ridge(const struct tb_switch *sw) in tb_switch_is_falcon_ridge()
888 static inline bool tb_switch_is_alpine_ridge(const struct tb_switch *sw) in tb_switch_is_alpine_ridge()
903 static inline bool tb_switch_is_titan_ridge(const struct tb_switch *sw) in tb_switch_is_titan_ridge()
916 static inline bool tb_switch_is_tiger_lake(const struct tb_switch *sw) in tb_switch_is_tiger_lake()
936 static inline bool tb_switch_is_usb4(const struct tb_switch *sw) in tb_switch_is_usb4()
950 static inline bool tb_switch_is_icm(const struct tb_switch *sw) in tb_switch_is_icm()
955 int tb_switch_lane_bonding_enable(struct tb_switch *sw);
956 void tb_switch_lane_bonding_disable(struct tb_switch *sw);
957 int tb_switch_configure_link(struct tb_switch *sw);
958 void tb_switch_unconfigure_link(struct tb_switch *sw);
960 bool tb_switch_query_dp_resource(struct tb_switch *sw, struct tb_port *in);
961 int tb_switch_alloc_dp_resource(struct tb_switch *sw, struct tb_port *in);
962 void tb_switch_dealloc_dp_resource(struct tb_switch *sw, struct tb_port *in);
964 int tb_switch_tmu_init(struct tb_switch *sw);
965 int tb_switch_tmu_post_time(struct tb_switch *sw);
966 int tb_switch_tmu_disable(struct tb_switch *sw);
967 int tb_switch_tmu_enable(struct tb_switch *sw);
968 void tb_switch_tmu_configure(struct tb_switch *sw,
971 void tb_switch_enable_tmu_1st_child(struct tb_switch *sw,
981 static inline bool tb_switch_tmu_is_enabled(const struct tb_switch *sw, in tb_switch_tmu_is_enabled()
999 int tb_switch_enable_clx(struct tb_switch *sw, enum tb_clx clx);
1000 int tb_switch_disable_clx(struct tb_switch *sw, enum tb_clx clx);
1010 static inline bool tb_switch_is_clx_enabled(const struct tb_switch *sw, in tb_switch_is_clx_enabled()
1020 static inline bool tb_switch_is_clx_supported(const struct tb_switch *sw) in tb_switch_is_clx_supported()
1025 int tb_switch_mask_clx_objections(struct tb_switch *sw);
1027 int tb_switch_pcie_l1_enable(struct tb_switch *sw);
1029 int tb_switch_xhci_connect(struct tb_switch *sw);
1030 void tb_switch_xhci_disconnect(struct tb_switch *sw);
1074 int tb_switch_find_vse_cap(struct tb_switch *sw, enum tb_switch_vse_cap vsec);
1075 int tb_switch_find_cap(struct tb_switch *sw, enum tb_switch_cap cap);
1076 int tb_switch_next_cap(struct tb_switch *sw, unsigned int offset);
1119 int tb_drom_read(struct tb_switch *sw);
1120 int tb_drom_read_uid_only(struct tb_switch *sw, u64 *uid);
1122 int tb_lc_read_uuid(struct tb_switch *sw, u32 *uuid);
1133 int tb_lc_set_wake(struct tb_switch *sw, unsigned int flags);
1134 int tb_lc_set_sleep(struct tb_switch *sw);
1135 bool tb_lc_lane_bonding_possible(struct tb_switch *sw);
1136 bool tb_lc_dp_sink_query(struct tb_switch *sw, struct tb_port *in);
1137 int tb_lc_dp_sink_alloc(struct tb_switch *sw, struct tb_port *in);
1138 int tb_lc_dp_sink_dealloc(struct tb_switch *sw, struct tb_port *in);
1139 int tb_lc_force_power(struct tb_switch *sw);
1170 static inline struct tb_switch *tb_xdomain_parent(struct tb_xdomain *xd) in tb_xdomain_parent()
1192 int usb4_switch_setup(struct tb_switch *sw);
1193 int usb4_switch_read_uid(struct tb_switch *sw, u64 *uid);
1194 int usb4_switch_drom_read(struct tb_switch *sw, unsigned int address, void *buf,
1196 bool usb4_switch_lane_bonding_possible(struct tb_switch *sw);
1197 int usb4_switch_set_wake(struct tb_switch *sw, unsigned int flags);
1198 int usb4_switch_set_sleep(struct tb_switch *sw);
1199 int usb4_switch_nvm_sector_size(struct tb_switch *sw);
1200 int usb4_switch_nvm_read(struct tb_switch *sw, unsigned int address, void *buf,
1202 int usb4_switch_nvm_set_offset(struct tb_switch *sw, unsigned int address);
1203 int usb4_switch_nvm_write(struct tb_switch *sw, unsigned int address,
1205 int usb4_switch_nvm_authenticate(struct tb_switch *sw);
1206 int usb4_switch_nvm_authenticate_status(struct tb_switch *sw, u32 *status);
1207 int usb4_switch_credits_init(struct tb_switch *sw);
1208 bool usb4_switch_query_dp_resource(struct tb_switch *sw, struct tb_port *in);
1209 int usb4_switch_alloc_dp_resource(struct tb_switch *sw, struct tb_port *in);
1210 int usb4_switch_dealloc_dp_resource(struct tb_switch *sw, struct tb_port *in);
1211 struct tb_port *usb4_switch_map_pcie_down(struct tb_switch *sw,
1213 struct tb_port *usb4_switch_map_usb3_down(struct tb_switch *sw,
1215 int usb4_switch_add_ports(struct tb_switch *sw);
1216 void usb4_switch_remove_ports(struct tb_switch *sw);
1297 void tb_check_quirks(struct tb_switch *sw);
1330 void tb_switch_debugfs_init(struct tb_switch *sw);
1331 void tb_switch_debugfs_remove(struct tb_switch *sw);
1339 static inline void tb_switch_debugfs_init(struct tb_switch *sw) { } in tb_switch_debugfs_init()
1340 static inline void tb_switch_debugfs_remove(struct tb_switch *sw) { } in tb_switch_debugfs_remove()