Lines Matching defs:tb_switch
97 * struct tb_switch - a thunderbolt switch
142 struct tb_switch {
181 * struct tb_port - a thunderbolt port, part of a tb_switch
202 struct tb_switch *sw;
383 int (*runtime_suspend_switch)(struct tb_switch *sw);
384 int (*runtime_resume_switch)(struct tb_switch *sw);
389 int (*approve_switch)(struct tb *tb, struct tb_switch *sw);
390 int (*add_switch_key)(struct tb *tb, struct tb_switch *sw);
391 int (*challenge_switch_key)(struct tb *tb, struct tb_switch *sw,
417 static inline struct tb_port *tb_upstream_port(struct tb_switch *sw)
435 static inline u64 tb_route(const struct tb_switch *sw)
440 static inline struct tb_port *tb_port_at(u64 route, struct tb_switch *sw)
508 static inline int tb_sw_read(struct tb_switch *sw, void *buffer,
522 static inline int tb_sw_write(struct tb_switch *sw, const void *buffer,
572 const struct tb_switch *__sw = (sw); \
619 int tb_domain_approve_switch(struct tb *tb, struct tb_switch *sw);
620 int tb_domain_approve_switch_key(struct tb *tb, struct tb_switch *sw);
621 int tb_domain_challenge_switch_key(struct tb *tb, struct tb_switch *sw);
648 struct tb_switch *tb_switch_alloc(struct tb *tb, struct device *parent,
650 struct tb_switch *tb_switch_alloc_safe_mode(struct tb *tb,
652 int tb_switch_configure(struct tb_switch *sw);
653 int tb_switch_add(struct tb_switch *sw);
654 void tb_switch_remove(struct tb_switch *sw);
655 void tb_switch_suspend(struct tb_switch *sw, bool runtime);
656 int tb_switch_resume(struct tb_switch *sw);
657 int tb_switch_reset(struct tb_switch *sw);
658 void tb_sw_set_unplugged(struct tb_switch *sw);
659 struct tb_port *tb_switch_find_port(struct tb_switch *sw,
661 struct tb_switch *tb_switch_find_by_link_depth(struct tb *tb, u8 link,
663 struct tb_switch *tb_switch_find_by_uuid(struct tb *tb, const uuid_t *uuid);
664 struct tb_switch *tb_switch_find_by_route(struct tb *tb, u64 route);
677 static inline struct tb_switch *tb_switch_get(struct tb_switch *sw)
684 static inline void tb_switch_put(struct tb_switch *sw)
694 static inline struct tb_switch *tb_to_switch(struct device *dev)
697 return container_of(dev, struct tb_switch, dev);
701 static inline struct tb_switch *tb_switch_parent(struct tb_switch *sw)
706 static inline bool tb_switch_is_light_ridge(const struct tb_switch *sw)
712 static inline bool tb_switch_is_eagle_ridge(const struct tb_switch *sw)
718 static inline bool tb_switch_is_cactus_ridge(const struct tb_switch *sw)
730 static inline bool tb_switch_is_falcon_ridge(const struct tb_switch *sw)
742 static inline bool tb_switch_is_alpine_ridge(const struct tb_switch *sw)
756 static inline bool tb_switch_is_titan_ridge(const struct tb_switch *sw)
769 static inline bool tb_switch_is_ice_lake(const struct tb_switch *sw)
781 static inline bool tb_switch_is_tiger_lake(const struct tb_switch *sw)
801 static inline bool tb_switch_is_usb4(const struct tb_switch *sw)
815 static inline bool tb_switch_is_icm(const struct tb_switch *sw)
820 int tb_switch_lane_bonding_enable(struct tb_switch *sw);
821 void tb_switch_lane_bonding_disable(struct tb_switch *sw);
822 int tb_switch_configure_link(struct tb_switch *sw);
823 void tb_switch_unconfigure_link(struct tb_switch *sw);
825 bool tb_switch_query_dp_resource(struct tb_switch *sw, struct tb_port *in);
826 int tb_switch_alloc_dp_resource(struct tb_switch *sw, struct tb_port *in);
827 void tb_switch_dealloc_dp_resource(struct tb_switch *sw, struct tb_port *in);
829 int tb_switch_tmu_init(struct tb_switch *sw);
830 int tb_switch_tmu_post_time(struct tb_switch *sw);
831 int tb_switch_tmu_disable(struct tb_switch *sw);
832 int tb_switch_tmu_enable(struct tb_switch *sw);
834 static inline bool tb_switch_tmu_is_enabled(const struct tb_switch *sw)
868 int tb_switch_find_vse_cap(struct tb_switch *sw, enum tb_switch_vse_cap vsec);
869 int tb_switch_find_cap(struct tb_switch *sw, enum tb_switch_cap cap);
870 int tb_switch_next_cap(struct tb_switch *sw, unsigned int offset);
901 int tb_drom_read(struct tb_switch *sw);
902 int tb_drom_read_uid_only(struct tb_switch *sw, u64 *uid);
904 int tb_lc_read_uuid(struct tb_switch *sw, u32 *uuid);
909 int tb_lc_set_wake(struct tb_switch *sw, unsigned int flags);
910 int tb_lc_set_sleep(struct tb_switch *sw);
911 bool tb_lc_lane_bonding_possible(struct tb_switch *sw);
912 bool tb_lc_dp_sink_query(struct tb_switch *sw, struct tb_port *in);
913 int tb_lc_dp_sink_alloc(struct tb_switch *sw, struct tb_port *in);
914 int tb_lc_dp_sink_dealloc(struct tb_switch *sw, struct tb_port *in);
915 int tb_lc_force_power(struct tb_switch *sw);
960 int usb4_switch_setup(struct tb_switch *sw);
961 int usb4_switch_read_uid(struct tb_switch *sw, u64 *uid);
962 int usb4_switch_drom_read(struct tb_switch *sw, unsigned int address, void *buf,
964 bool usb4_switch_lane_bonding_possible(struct tb_switch *sw);
965 int usb4_switch_set_wake(struct tb_switch *sw, unsigned int flags);
966 int usb4_switch_set_sleep(struct tb_switch *sw);
967 int usb4_switch_nvm_sector_size(struct tb_switch *sw);
968 int usb4_switch_nvm_read(struct tb_switch *sw, unsigned int address, void *buf,
970 int usb4_switch_nvm_write(struct tb_switch *sw, unsigned int address,
972 int usb4_switch_nvm_authenticate(struct tb_switch *sw);
973 bool usb4_switch_query_dp_resource(struct tb_switch *sw, struct tb_port *in);
974 int usb4_switch_alloc_dp_resource(struct tb_switch *sw, struct tb_port *in);
975 int usb4_switch_dealloc_dp_resource(struct tb_switch *sw, struct tb_port *in);
976 struct tb_port *usb4_switch_map_pcie_down(struct tb_switch *sw,
978 struct tb_port *usb4_switch_map_usb3_down(struct tb_switch *sw,
1016 void tb_check_quirks(struct tb_switch *sw);
1027 void tb_switch_debugfs_init(struct tb_switch *sw);
1028 void tb_switch_debugfs_remove(struct tb_switch *sw);
1032 static inline void tb_switch_debugfs_init(struct tb_switch *sw) { }
1033 static inline void tb_switch_debugfs_remove(struct tb_switch *sw) { }