Lines Matching refs:tb_switch

171 struct tb_switch {  struct
282 struct tb_switch *sw;
519 int (*runtime_suspend_switch)(struct tb_switch *sw);
520 int (*runtime_resume_switch)(struct tb_switch *sw);
525 int (*disapprove_switch)(struct tb *tb, struct tb_switch *sw);
526 int (*approve_switch)(struct tb *tb, struct tb_switch *sw);
527 int (*add_switch_key)(struct tb *tb, struct tb_switch *sw);
528 int (*challenge_switch_key)(struct tb *tb, struct tb_switch *sw,
537 int (*usb4_switch_op)(struct tb_switch *sw, u16 opcode, u32 *metadata,
540 int (*usb4_switch_nvm_authenticate_status)(struct tb_switch *sw,
563 static inline struct tb_port *tb_upstream_port(struct tb_switch *sw) in tb_upstream_port()
581 static inline u64 tb_route(const struct tb_switch *sw) in tb_route()
586 static inline struct tb_port *tb_port_at(u64 route, struct tb_switch *sw) in tb_port_at()
670 static inline int tb_sw_read(struct tb_switch *sw, void *buffer, in tb_sw_read()
684 static inline int tb_sw_write(struct tb_switch *sw, const void *buffer, in tb_sw_write()
734 const struct tb_switch *__sw = (sw); \
782 int tb_domain_disapprove_switch(struct tb *tb, struct tb_switch *sw);
783 int tb_domain_approve_switch(struct tb *tb, struct tb_switch *sw);
784 int tb_domain_approve_switch_key(struct tb *tb, struct tb_switch *sw);
785 int tb_domain_challenge_switch_key(struct tb *tb, struct tb_switch *sw);
841 int tb_switch_nvm_read(struct tb_switch *sw, unsigned int address, void *buf,
843 struct tb_switch *tb_switch_alloc(struct tb *tb, struct device *parent,
845 struct tb_switch *tb_switch_alloc_safe_mode(struct tb *tb,
847 int tb_switch_configure(struct tb_switch *sw);
848 int tb_switch_configuration_valid(struct tb_switch *sw);
849 int tb_switch_add(struct tb_switch *sw);
850 void tb_switch_remove(struct tb_switch *sw);
851 void tb_switch_suspend(struct tb_switch *sw, bool runtime);
852 int tb_switch_resume(struct tb_switch *sw, bool runtime);
853 int tb_switch_reset(struct tb_switch *sw);
854 int tb_switch_wait_for_bit(struct tb_switch *sw, u32 offset, u32 bit,
856 void tb_sw_set_unplugged(struct tb_switch *sw);
857 struct tb_port *tb_switch_find_port(struct tb_switch *sw,
859 struct tb_switch *tb_switch_find_by_link_depth(struct tb *tb, u8 link,
861 struct tb_switch *tb_switch_find_by_uuid(struct tb *tb, const uuid_t *uuid);
862 struct tb_switch *tb_switch_find_by_route(struct tb *tb, u64 route);
875 static inline struct tb_switch *tb_switch_get(struct tb_switch *sw) in tb_switch_get()
882 static inline void tb_switch_put(struct tb_switch *sw) in tb_switch_put()
892 static inline struct tb_switch *tb_to_switch(const struct device *dev) in tb_to_switch()
895 return container_of(dev, struct tb_switch, dev); in tb_to_switch()
899 static inline struct tb_switch *tb_switch_parent(struct tb_switch *sw) in tb_switch_parent()
911 static inline struct tb_port *tb_switch_downstream_port(struct tb_switch *sw) in tb_switch_downstream_port()
922 static inline int tb_switch_depth(const struct tb_switch *sw) in tb_switch_depth()
927 static inline bool tb_switch_is_light_ridge(const struct tb_switch *sw) in tb_switch_is_light_ridge()
933 static inline bool tb_switch_is_eagle_ridge(const struct tb_switch *sw) in tb_switch_is_eagle_ridge()
939 static inline bool tb_switch_is_cactus_ridge(const struct tb_switch *sw) in tb_switch_is_cactus_ridge()
951 static inline bool tb_switch_is_falcon_ridge(const struct tb_switch *sw) in tb_switch_is_falcon_ridge()
963 static inline bool tb_switch_is_alpine_ridge(const struct tb_switch *sw) in tb_switch_is_alpine_ridge()
978 static inline bool tb_switch_is_titan_ridge(const struct tb_switch *sw) in tb_switch_is_titan_ridge()
991 static inline bool tb_switch_is_tiger_lake(const struct tb_switch *sw) in tb_switch_is_tiger_lake()
1014 static inline bool tb_switch_is_icm(const struct tb_switch *sw) in tb_switch_is_icm()
1019 int tb_switch_set_link_width(struct tb_switch *sw, enum tb_link_width width);
1020 int tb_switch_configure_link(struct tb_switch *sw);
1021 void tb_switch_unconfigure_link(struct tb_switch *sw);
1023 bool tb_switch_query_dp_resource(struct tb_switch *sw, struct tb_port *in);
1024 int tb_switch_alloc_dp_resource(struct tb_switch *sw, struct tb_port *in);
1025 void tb_switch_dealloc_dp_resource(struct tb_switch *sw, struct tb_port *in);
1027 int tb_switch_tmu_init(struct tb_switch *sw);
1028 int tb_switch_tmu_post_time(struct tb_switch *sw);
1029 int tb_switch_tmu_disable(struct tb_switch *sw);
1030 int tb_switch_tmu_enable(struct tb_switch *sw);
1031 int tb_switch_tmu_configure(struct tb_switch *sw, enum tb_switch_tmu_mode mode);
1041 static inline bool tb_switch_tmu_is_configured(const struct tb_switch *sw, in tb_switch_tmu_is_configured()
1054 static inline bool tb_switch_tmu_is_enabled(const struct tb_switch *sw) in tb_switch_tmu_is_enabled()
1062 int tb_switch_clx_init(struct tb_switch *sw);
1063 int tb_switch_clx_enable(struct tb_switch *sw, unsigned int clx);
1064 int tb_switch_clx_disable(struct tb_switch *sw);
1076 static inline bool tb_switch_clx_is_enabled(const struct tb_switch *sw, in tb_switch_clx_is_enabled()
1082 int tb_switch_pcie_l1_enable(struct tb_switch *sw);
1084 int tb_switch_xhci_connect(struct tb_switch *sw);
1085 void tb_switch_xhci_disconnect(struct tb_switch *sw);
1159 int tb_switch_find_vse_cap(struct tb_switch *sw, enum tb_switch_vse_cap vsec);
1160 int tb_switch_find_cap(struct tb_switch *sw, enum tb_switch_cap cap);
1161 int tb_switch_next_cap(struct tb_switch *sw, unsigned int offset);
1205 int tb_drom_read(struct tb_switch *sw);
1206 int tb_drom_read_uid_only(struct tb_switch *sw, u64 *uid);
1208 int tb_lc_read_uuid(struct tb_switch *sw, u32 *uuid);
1220 int tb_lc_set_wake(struct tb_switch *sw, unsigned int flags);
1221 int tb_lc_set_sleep(struct tb_switch *sw);
1222 bool tb_lc_lane_bonding_possible(struct tb_switch *sw);
1223 bool tb_lc_dp_sink_query(struct tb_switch *sw, struct tb_port *in);
1224 int tb_lc_dp_sink_alloc(struct tb_switch *sw, struct tb_port *in);
1225 int tb_lc_dp_sink_dealloc(struct tb_switch *sw, struct tb_port *in);
1226 int tb_lc_force_power(struct tb_switch *sw);
1257 static inline struct tb_switch *tb_xdomain_parent(struct tb_xdomain *xd) in tb_xdomain_parent()
1297 static inline unsigned int usb4_switch_version(const struct tb_switch *sw) in usb4_switch_version()
1308 static inline bool tb_switch_is_usb4(const struct tb_switch *sw) in tb_switch_is_usb4()
1313 void usb4_switch_check_wakes(struct tb_switch *sw);
1314 int usb4_switch_setup(struct tb_switch *sw);
1315 int usb4_switch_configuration_valid(struct tb_switch *sw);
1316 int usb4_switch_read_uid(struct tb_switch *sw, u64 *uid);
1317 int usb4_switch_drom_read(struct tb_switch *sw, unsigned int address, void *buf,
1319 bool usb4_switch_lane_bonding_possible(struct tb_switch *sw);
1320 int usb4_switch_set_wake(struct tb_switch *sw, unsigned int flags, bool runtime);
1321 int usb4_switch_set_sleep(struct tb_switch *sw);
1322 int usb4_switch_nvm_sector_size(struct tb_switch *sw);
1323 int usb4_switch_nvm_read(struct tb_switch *sw, unsigned int address, void *buf,
1325 int usb4_switch_nvm_set_offset(struct tb_switch *sw, unsigned int address);
1326 int usb4_switch_nvm_write(struct tb_switch *sw, unsigned int address,
1328 int usb4_switch_nvm_authenticate(struct tb_switch *sw);
1329 int usb4_switch_nvm_authenticate_status(struct tb_switch *sw, u32 *status);
1330 int usb4_switch_credits_init(struct tb_switch *sw);
1331 bool usb4_switch_query_dp_resource(struct tb_switch *sw, struct tb_port *in);
1332 int usb4_switch_alloc_dp_resource(struct tb_switch *sw, struct tb_port *in);
1333 int usb4_switch_dealloc_dp_resource(struct tb_switch *sw, struct tb_port *in);
1334 struct tb_port *usb4_switch_map_pcie_down(struct tb_switch *sw,
1336 struct tb_port *usb4_switch_map_usb3_down(struct tb_switch *sw,
1338 int usb4_switch_add_ports(struct tb_switch *sw);
1339 void usb4_switch_remove_ports(struct tb_switch *sw);
1484 int usb4_port_index(const struct tb_switch *sw, const struct tb_port *port);
1491 void tb_check_quirks(struct tb_switch *sw);
1524 void tb_switch_debugfs_init(struct tb_switch *sw);
1525 void tb_switch_debugfs_remove(struct tb_switch *sw);
1535 static inline void tb_switch_debugfs_init(struct tb_switch *sw) { } in tb_switch_debugfs_init()
1536 static inline void tb_switch_debugfs_remove(struct tb_switch *sw) { } in tb_switch_debugfs_remove()