Lines Matching refs:tb_switch
179 struct tb_switch { struct
256 struct tb_switch *sw;
475 int (*runtime_suspend_switch)(struct tb_switch *sw);
476 int (*runtime_resume_switch)(struct tb_switch *sw);
481 int (*disapprove_switch)(struct tb *tb, struct tb_switch *sw);
482 int (*approve_switch)(struct tb *tb, struct tb_switch *sw);
483 int (*add_switch_key)(struct tb *tb, struct tb_switch *sw);
484 int (*challenge_switch_key)(struct tb *tb, struct tb_switch *sw,
493 int (*usb4_switch_op)(struct tb_switch *sw, u16 opcode, u32 *metadata,
496 int (*usb4_switch_nvm_authenticate_status)(struct tb_switch *sw,
519 static inline struct tb_port *tb_upstream_port(struct tb_switch *sw) in tb_upstream_port()
537 static inline u64 tb_route(const struct tb_switch *sw) in tb_route()
542 static inline struct tb_port *tb_port_at(u64 route, struct tb_switch *sw) in tb_port_at()
610 static inline int tb_sw_read(struct tb_switch *sw, void *buffer, in tb_sw_read()
624 static inline int tb_sw_write(struct tb_switch *sw, const void *buffer, in tb_sw_write()
674 const struct tb_switch *__sw = (sw); \
722 int tb_domain_disapprove_switch(struct tb *tb, struct tb_switch *sw);
723 int tb_domain_approve_switch(struct tb *tb, struct tb_switch *sw);
724 int tb_domain_approve_switch_key(struct tb *tb, struct tb_switch *sw);
725 int tb_domain_challenge_switch_key(struct tb *tb, struct tb_switch *sw);
768 int tb_switch_nvm_read(struct tb_switch *sw, unsigned int address, void *buf,
770 struct tb_switch *tb_switch_alloc(struct tb *tb, struct device *parent,
772 struct tb_switch *tb_switch_alloc_safe_mode(struct tb *tb,
774 int tb_switch_configure(struct tb_switch *sw);
775 int tb_switch_add(struct tb_switch *sw);
776 void tb_switch_remove(struct tb_switch *sw);
777 void tb_switch_suspend(struct tb_switch *sw, bool runtime);
778 int tb_switch_resume(struct tb_switch *sw);
779 int tb_switch_reset(struct tb_switch *sw);
780 int tb_switch_wait_for_bit(struct tb_switch *sw, u32 offset, u32 bit,
782 void tb_sw_set_unplugged(struct tb_switch *sw);
783 struct tb_port *tb_switch_find_port(struct tb_switch *sw,
785 struct tb_switch *tb_switch_find_by_link_depth(struct tb *tb, u8 link,
787 struct tb_switch *tb_switch_find_by_uuid(struct tb *tb, const uuid_t *uuid);
788 struct tb_switch *tb_switch_find_by_route(struct tb *tb, u64 route);
801 static inline struct tb_switch *tb_switch_get(struct tb_switch *sw) in tb_switch_get()
808 static inline void tb_switch_put(struct tb_switch *sw) in tb_switch_put()
818 static inline struct tb_switch *tb_to_switch(struct device *dev) in tb_to_switch()
821 return container_of(dev, struct tb_switch, dev); in tb_to_switch()
825 static inline struct tb_switch *tb_switch_parent(struct tb_switch *sw) in tb_switch_parent()
830 static inline bool tb_switch_is_light_ridge(const struct tb_switch *sw) in tb_switch_is_light_ridge()
836 static inline bool tb_switch_is_eagle_ridge(const struct tb_switch *sw) in tb_switch_is_eagle_ridge()
842 static inline bool tb_switch_is_cactus_ridge(const struct tb_switch *sw) in tb_switch_is_cactus_ridge()
854 static inline bool tb_switch_is_falcon_ridge(const struct tb_switch *sw) in tb_switch_is_falcon_ridge()
866 static inline bool tb_switch_is_alpine_ridge(const struct tb_switch *sw) in tb_switch_is_alpine_ridge()
881 static inline bool tb_switch_is_titan_ridge(const struct tb_switch *sw) in tb_switch_is_titan_ridge()
894 static inline bool tb_switch_is_tiger_lake(const struct tb_switch *sw) in tb_switch_is_tiger_lake()
914 static inline bool tb_switch_is_usb4(const struct tb_switch *sw) in tb_switch_is_usb4()
928 static inline bool tb_switch_is_icm(const struct tb_switch *sw) in tb_switch_is_icm()
933 int tb_switch_lane_bonding_enable(struct tb_switch *sw);
934 void tb_switch_lane_bonding_disable(struct tb_switch *sw);
935 int tb_switch_configure_link(struct tb_switch *sw);
936 void tb_switch_unconfigure_link(struct tb_switch *sw);
938 bool tb_switch_query_dp_resource(struct tb_switch *sw, struct tb_port *in);
939 int tb_switch_alloc_dp_resource(struct tb_switch *sw, struct tb_port *in);
940 void tb_switch_dealloc_dp_resource(struct tb_switch *sw, struct tb_port *in);
942 int tb_switch_tmu_init(struct tb_switch *sw);
943 int tb_switch_tmu_post_time(struct tb_switch *sw);
944 int tb_switch_tmu_disable(struct tb_switch *sw);
945 int tb_switch_tmu_enable(struct tb_switch *sw);
946 void tb_switch_tmu_configure(struct tb_switch *sw,
949 void tb_switch_enable_tmu_1st_child(struct tb_switch *sw,
959 static inline bool tb_switch_tmu_is_enabled(const struct tb_switch *sw, in tb_switch_tmu_is_enabled()
977 int tb_switch_enable_clx(struct tb_switch *sw, enum tb_clx clx);
978 int tb_switch_disable_clx(struct tb_switch *sw, enum tb_clx clx);
988 static inline bool tb_switch_is_clx_enabled(const struct tb_switch *sw, in tb_switch_is_clx_enabled()
998 static inline bool tb_switch_is_clx_supported(const struct tb_switch *sw) in tb_switch_is_clx_supported()
1003 int tb_switch_mask_clx_objections(struct tb_switch *sw);
1005 int tb_switch_pcie_l1_enable(struct tb_switch *sw);
1007 int tb_switch_xhci_connect(struct tb_switch *sw);
1008 void tb_switch_xhci_disconnect(struct tb_switch *sw);
1052 int tb_switch_find_vse_cap(struct tb_switch *sw, enum tb_switch_vse_cap vsec);
1053 int tb_switch_find_cap(struct tb_switch *sw, enum tb_switch_cap cap);
1054 int tb_switch_next_cap(struct tb_switch *sw, unsigned int offset);
1097 int tb_drom_read(struct tb_switch *sw);
1098 int tb_drom_read_uid_only(struct tb_switch *sw, u64 *uid);
1100 int tb_lc_read_uuid(struct tb_switch *sw, u32 *uuid);
1111 int tb_lc_set_wake(struct tb_switch *sw, unsigned int flags);
1112 int tb_lc_set_sleep(struct tb_switch *sw);
1113 bool tb_lc_lane_bonding_possible(struct tb_switch *sw);
1114 bool tb_lc_dp_sink_query(struct tb_switch *sw, struct tb_port *in);
1115 int tb_lc_dp_sink_alloc(struct tb_switch *sw, struct tb_port *in);
1116 int tb_lc_dp_sink_dealloc(struct tb_switch *sw, struct tb_port *in);
1117 int tb_lc_force_power(struct tb_switch *sw);
1148 static inline struct tb_switch *tb_xdomain_parent(struct tb_xdomain *xd) in tb_xdomain_parent()
1170 int usb4_switch_setup(struct tb_switch *sw);
1171 int usb4_switch_read_uid(struct tb_switch *sw, u64 *uid);
1172 int usb4_switch_drom_read(struct tb_switch *sw, unsigned int address, void *buf,
1174 bool usb4_switch_lane_bonding_possible(struct tb_switch *sw);
1175 int usb4_switch_set_wake(struct tb_switch *sw, unsigned int flags);
1176 int usb4_switch_set_sleep(struct tb_switch *sw);
1177 int usb4_switch_nvm_sector_size(struct tb_switch *sw);
1178 int usb4_switch_nvm_read(struct tb_switch *sw, unsigned int address, void *buf,
1180 int usb4_switch_nvm_set_offset(struct tb_switch *sw, unsigned int address);
1181 int usb4_switch_nvm_write(struct tb_switch *sw, unsigned int address,
1183 int usb4_switch_nvm_authenticate(struct tb_switch *sw);
1184 int usb4_switch_nvm_authenticate_status(struct tb_switch *sw, u32 *status);
1185 int usb4_switch_credits_init(struct tb_switch *sw);
1186 bool usb4_switch_query_dp_resource(struct tb_switch *sw, struct tb_port *in);
1187 int usb4_switch_alloc_dp_resource(struct tb_switch *sw, struct tb_port *in);
1188 int usb4_switch_dealloc_dp_resource(struct tb_switch *sw, struct tb_port *in);
1189 struct tb_port *usb4_switch_map_pcie_down(struct tb_switch *sw,
1191 struct tb_port *usb4_switch_map_usb3_down(struct tb_switch *sw,
1193 int usb4_switch_add_ports(struct tb_switch *sw);
1194 void usb4_switch_remove_ports(struct tb_switch *sw);
1260 void tb_check_quirks(struct tb_switch *sw);
1293 void tb_switch_debugfs_init(struct tb_switch *sw);
1294 void tb_switch_debugfs_remove(struct tb_switch *sw);
1302 static inline void tb_switch_debugfs_init(struct tb_switch *sw) { } in tb_switch_debugfs_init()
1303 static inline void tb_switch_debugfs_remove(struct tb_switch *sw) { } in tb_switch_debugfs_remove()