Lines Matching refs:tb_switch
88 struct tb_switch { struct
138 struct tb_switch *sw;
278 int (*runtime_suspend_switch)(struct tb_switch *sw);
279 int (*runtime_resume_switch)(struct tb_switch *sw);
284 int (*approve_switch)(struct tb *tb, struct tb_switch *sw);
285 int (*add_switch_key)(struct tb *tb, struct tb_switch *sw);
286 int (*challenge_switch_key)(struct tb *tb, struct tb_switch *sw,
312 static inline struct tb_port *tb_upstream_port(struct tb_switch *sw) in tb_upstream_port()
330 static inline u64 tb_route(const struct tb_switch *sw) in tb_route()
335 static inline struct tb_port *tb_port_at(u64 route, struct tb_switch *sw) in tb_port_at()
388 static inline int tb_sw_read(struct tb_switch *sw, void *buffer, in tb_sw_read()
402 static inline int tb_sw_write(struct tb_switch *sw, void *buffer, in tb_sw_write()
452 const struct tb_switch *__sw = (sw); \
497 int tb_domain_approve_switch(struct tb *tb, struct tb_switch *sw);
498 int tb_domain_approve_switch_key(struct tb *tb, struct tb_switch *sw);
499 int tb_domain_challenge_switch_key(struct tb *tb, struct tb_switch *sw);
517 struct tb_switch *tb_switch_alloc(struct tb *tb, struct device *parent,
519 struct tb_switch *tb_switch_alloc_safe_mode(struct tb *tb,
521 int tb_switch_configure(struct tb_switch *sw);
522 int tb_switch_add(struct tb_switch *sw);
523 void tb_switch_remove(struct tb_switch *sw);
524 void tb_switch_suspend(struct tb_switch *sw);
525 int tb_switch_resume(struct tb_switch *sw);
527 void tb_sw_set_unplugged(struct tb_switch *sw);
528 struct tb_switch *tb_switch_find_by_link_depth(struct tb *tb, u8 link,
530 struct tb_switch *tb_switch_find_by_uuid(struct tb *tb, const uuid_t *uuid);
531 struct tb_switch *tb_switch_find_by_route(struct tb *tb, u64 route);
533 static inline struct tb_switch *tb_switch_get(struct tb_switch *sw) in tb_switch_get()
540 static inline void tb_switch_put(struct tb_switch *sw) in tb_switch_put()
550 static inline struct tb_switch *tb_to_switch(struct device *dev) in tb_to_switch()
553 return container_of(dev, struct tb_switch, dev); in tb_to_switch()
557 static inline struct tb_switch *tb_switch_parent(struct tb_switch *sw) in tb_switch_parent()
562 static inline bool tb_switch_is_lr(const struct tb_switch *sw) in tb_switch_is_lr()
567 static inline bool tb_switch_is_er(const struct tb_switch *sw) in tb_switch_is_er()
572 static inline bool tb_switch_is_cr(const struct tb_switch *sw) in tb_switch_is_cr()
583 static inline bool tb_switch_is_fr(const struct tb_switch *sw) in tb_switch_is_fr()
605 int tb_switch_find_vse_cap(struct tb_switch *sw, enum tb_switch_vse_cap vsec);
630 int tb_drom_read(struct tb_switch *sw);
631 int tb_drom_read_uid_only(struct tb_switch *sw, u64 *uid);
633 int tb_lc_read_uuid(struct tb_switch *sw, u32 *uuid);
634 int tb_lc_configure_link(struct tb_switch *sw);
635 void tb_lc_unconfigure_link(struct tb_switch *sw);
636 int tb_lc_set_sleep(struct tb_switch *sw);