diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2022-09-30 11:12:42 +0300 |
---|---|---|
committer | Mika Westerberg <mika.westerberg@linux.intel.com> | 2023-06-09 12:07:22 +0300 |
commit | 17fb1a3df9c3059798bfd823f58407e206c31ab9 (patch) | |
tree | 245b566a1f081a0803f711814860971f10cf1b92 /drivers/thunderbolt/tb.h | |
parent | 7ce542219b6323764cb922722b677005404d9b60 (diff) |
thunderbolt: Introduce tb_xdomain_downstream_port()
In the same way we did for the routers add a function that returns the
parent routers downstream facing port for XDomain devices.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/tb.h')
-rw-r--r-- | drivers/thunderbolt/tb.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h index a8e1725b4cb5..1e617c6e11ae 100644 --- a/drivers/thunderbolt/tb.h +++ b/drivers/thunderbolt/tb.h @@ -1197,6 +1197,17 @@ static inline struct tb_switch *tb_xdomain_parent(struct tb_xdomain *xd) return tb_to_switch(xd->dev.parent); } +/** + * tb_xdomain_downstream_port() - Return downstream facing port of parent router + * @xd: Xdomain pointer + * + * Returns the downstream port the XDomain is connected to. + */ +static inline struct tb_port *tb_xdomain_downstream_port(struct tb_xdomain *xd) +{ + return tb_port_at(xd->route, tb_xdomain_parent(xd)); +} + int tb_retimer_nvm_read(struct tb_retimer *rt, unsigned int address, void *buf, size_t size); int tb_retimer_scan(struct tb_port *port, bool add); |