Lines Matching refs:tb_switch

157 struct tb_switch {  struct
231 struct tb_switch *sw;
442 int (*runtime_suspend_switch)(struct tb_switch *sw);
443 int (*runtime_resume_switch)(struct tb_switch *sw);
448 int (*disapprove_switch)(struct tb *tb, struct tb_switch *sw);
449 int (*approve_switch)(struct tb *tb, struct tb_switch *sw);
450 int (*add_switch_key)(struct tb *tb, struct tb_switch *sw);
451 int (*challenge_switch_key)(struct tb *tb, struct tb_switch *sw,
460 int (*usb4_switch_op)(struct tb_switch *sw, u16 opcode, u32 *metadata,
463 int (*usb4_switch_nvm_authenticate_status)(struct tb_switch *sw,
486 static inline struct tb_port *tb_upstream_port(struct tb_switch *sw) in tb_upstream_port()
504 static inline u64 tb_route(const struct tb_switch *sw) in tb_route()
509 static inline struct tb_port *tb_port_at(u64 route, struct tb_switch *sw) in tb_port_at()
577 static inline int tb_sw_read(struct tb_switch *sw, void *buffer, in tb_sw_read()
591 static inline int tb_sw_write(struct tb_switch *sw, const void *buffer, in tb_sw_write()
641 const struct tb_switch *__sw = (sw); \
689 int tb_domain_disapprove_switch(struct tb *tb, struct tb_switch *sw);
690 int tb_domain_approve_switch(struct tb *tb, struct tb_switch *sw);
691 int tb_domain_approve_switch_key(struct tb *tb, struct tb_switch *sw);
692 int tb_domain_challenge_switch_key(struct tb *tb, struct tb_switch *sw);
733 struct tb_switch *tb_switch_alloc(struct tb *tb, struct device *parent,
735 struct tb_switch *tb_switch_alloc_safe_mode(struct tb *tb,
737 int tb_switch_configure(struct tb_switch *sw);
738 int tb_switch_add(struct tb_switch *sw);
739 void tb_switch_remove(struct tb_switch *sw);
740 void tb_switch_suspend(struct tb_switch *sw, bool runtime);
741 int tb_switch_resume(struct tb_switch *sw);
742 int tb_switch_reset(struct tb_switch *sw);
743 void tb_sw_set_unplugged(struct tb_switch *sw);
744 struct tb_port *tb_switch_find_port(struct tb_switch *sw,
746 struct tb_switch *tb_switch_find_by_link_depth(struct tb *tb, u8 link,
748 struct tb_switch *tb_switch_find_by_uuid(struct tb *tb, const uuid_t *uuid);
749 struct tb_switch *tb_switch_find_by_route(struct tb *tb, u64 route);
762 static inline struct tb_switch *tb_switch_get(struct tb_switch *sw) in tb_switch_get()
769 static inline void tb_switch_put(struct tb_switch *sw) in tb_switch_put()
779 static inline struct tb_switch *tb_to_switch(struct device *dev) in tb_to_switch()
782 return container_of(dev, struct tb_switch, dev); in tb_to_switch()
786 static inline struct tb_switch *tb_switch_parent(struct tb_switch *sw) in tb_switch_parent()
791 static inline bool tb_switch_is_light_ridge(const struct tb_switch *sw) in tb_switch_is_light_ridge()
797 static inline bool tb_switch_is_eagle_ridge(const struct tb_switch *sw) in tb_switch_is_eagle_ridge()
803 static inline bool tb_switch_is_cactus_ridge(const struct tb_switch *sw) in tb_switch_is_cactus_ridge()
815 static inline bool tb_switch_is_falcon_ridge(const struct tb_switch *sw) in tb_switch_is_falcon_ridge()
827 static inline bool tb_switch_is_alpine_ridge(const struct tb_switch *sw) in tb_switch_is_alpine_ridge()
841 static inline bool tb_switch_is_titan_ridge(const struct tb_switch *sw) in tb_switch_is_titan_ridge()
860 static inline bool tb_switch_is_usb4(const struct tb_switch *sw) in tb_switch_is_usb4()
874 static inline bool tb_switch_is_icm(const struct tb_switch *sw) in tb_switch_is_icm()
879 int tb_switch_lane_bonding_enable(struct tb_switch *sw);
880 void tb_switch_lane_bonding_disable(struct tb_switch *sw);
881 int tb_switch_configure_link(struct tb_switch *sw);
882 void tb_switch_unconfigure_link(struct tb_switch *sw);
884 bool tb_switch_query_dp_resource(struct tb_switch *sw, struct tb_port *in);
885 int tb_switch_alloc_dp_resource(struct tb_switch *sw, struct tb_port *in);
886 void tb_switch_dealloc_dp_resource(struct tb_switch *sw, struct tb_port *in);
888 int tb_switch_tmu_init(struct tb_switch *sw);
889 int tb_switch_tmu_post_time(struct tb_switch *sw);
890 int tb_switch_tmu_disable(struct tb_switch *sw);
891 int tb_switch_tmu_enable(struct tb_switch *sw);
893 static inline bool tb_switch_tmu_is_enabled(const struct tb_switch *sw) in tb_switch_tmu_is_enabled()
938 int tb_switch_find_vse_cap(struct tb_switch *sw, enum tb_switch_vse_cap vsec);
939 int tb_switch_find_cap(struct tb_switch *sw, enum tb_switch_cap cap);
940 int tb_switch_next_cap(struct tb_switch *sw, unsigned int offset);
982 int tb_drom_read(struct tb_switch *sw);
983 int tb_drom_read_uid_only(struct tb_switch *sw, u64 *uid);
985 int tb_lc_read_uuid(struct tb_switch *sw, u32 *uuid);
991 int tb_lc_set_wake(struct tb_switch *sw, unsigned int flags);
992 int tb_lc_set_sleep(struct tb_switch *sw);
993 bool tb_lc_lane_bonding_possible(struct tb_switch *sw);
994 bool tb_lc_dp_sink_query(struct tb_switch *sw, struct tb_port *in);
995 int tb_lc_dp_sink_alloc(struct tb_switch *sw, struct tb_port *in);
996 int tb_lc_dp_sink_dealloc(struct tb_switch *sw, struct tb_port *in);
997 int tb_lc_force_power(struct tb_switch *sw);
1043 int usb4_switch_setup(struct tb_switch *sw);
1044 int usb4_switch_read_uid(struct tb_switch *sw, u64 *uid);
1045 int usb4_switch_drom_read(struct tb_switch *sw, unsigned int address, void *buf,
1047 bool usb4_switch_lane_bonding_possible(struct tb_switch *sw);
1048 int usb4_switch_set_wake(struct tb_switch *sw, unsigned int flags);
1049 int usb4_switch_set_sleep(struct tb_switch *sw);
1050 int usb4_switch_nvm_sector_size(struct tb_switch *sw);
1051 int usb4_switch_nvm_read(struct tb_switch *sw, unsigned int address, void *buf,
1053 int usb4_switch_nvm_set_offset(struct tb_switch *sw, unsigned int address);
1054 int usb4_switch_nvm_write(struct tb_switch *sw, unsigned int address,
1056 int usb4_switch_nvm_authenticate(struct tb_switch *sw);
1057 int usb4_switch_nvm_authenticate_status(struct tb_switch *sw, u32 *status);
1058 int usb4_switch_credits_init(struct tb_switch *sw);
1059 bool usb4_switch_query_dp_resource(struct tb_switch *sw, struct tb_port *in);
1060 int usb4_switch_alloc_dp_resource(struct tb_switch *sw, struct tb_port *in);
1061 int usb4_switch_dealloc_dp_resource(struct tb_switch *sw, struct tb_port *in);
1062 struct tb_port *usb4_switch_map_pcie_down(struct tb_switch *sw,
1064 struct tb_port *usb4_switch_map_usb3_down(struct tb_switch *sw,
1066 int usb4_switch_add_ports(struct tb_switch *sw);
1067 void usb4_switch_remove_ports(struct tb_switch *sw);
1124 void tb_check_quirks(struct tb_switch *sw);
1157 void tb_switch_debugfs_init(struct tb_switch *sw);
1158 void tb_switch_debugfs_remove(struct tb_switch *sw);
1164 static inline void tb_switch_debugfs_init(struct tb_switch *sw) { } in tb_switch_debugfs_init()
1165 static inline void tb_switch_debugfs_remove(struct tb_switch *sw) { } in tb_switch_debugfs_remove()