diff options
| author | Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com> | 2025-04-14 19:55:53 +0200 |
|---|---|---|
| committer | Mika Westerberg <mika.westerberg@linux.intel.com> | 2025-04-17 12:21:45 +0300 |
| commit | e80c235994fd1d7004a4e5d64123f8f07ec80ade (patch) | |
| tree | c7648f0ab1d999e8e6988d08d366de244eb41c53 /include | |
| parent | thunderbolt: Expose usb4_port_index() to other modules (diff) | |
| download | linux-e80c235994fd1d7004a4e5d64123f8f07ec80ade.tar.gz linux-e80c235994fd1d7004a4e5d64123f8f07ec80ade.zip | |
thunderbolt: Add Thunderbolt/USB4 <-> USB3 match function
This function checks whether given USB4 port device matches with USB3.x
port device, using ACPI _DSD property.
It is designed to be used by component framework to match
USB4 ports with Type-C ports they are connected to.
Also, added USB4 config stub in case mapping function is not reachable.
Signed-off-by: Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/thunderbolt.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/thunderbolt.h b/include/linux/thunderbolt.h index 7d902d8c054b..75247486616b 100644 --- a/include/linux/thunderbolt.h +++ b/include/linux/thunderbolt.h @@ -11,6 +11,13 @@ #ifndef THUNDERBOLT_H_ #define THUNDERBOLT_H_ +#include <linux/types.h> + +struct fwnode_handle; +struct device; + +#if IS_REACHABLE(CONFIG_USB4) + #include <linux/device.h> #include <linux/idr.h> #include <linux/list.h> @@ -674,4 +681,15 @@ static inline struct device *tb_ring_dma_device(struct tb_ring *ring) return &ring->nhi->pdev->dev; } +bool usb4_usb3_port_match(struct device *usb4_port_dev, + const struct fwnode_handle *usb3_port_fwnode); + +#else /* CONFIG_USB4 */ +static inline bool usb4_usb3_port_match(struct device *usb4_port_dev, + const struct fwnode_handle *usb3_port_fwnode) +{ + return false; +} +#endif /* CONFIG_USB4 */ + #endif /* THUNDERBOLT_H_ */ |
