From: Gil Fine Date: Sat, 25 Jul 2020 07:44:16 +0000 (+0300) Subject: thunderbolt: Introduce tb_switch_is_tiger_lake() X-Git-Tag: v5.15~2673^2~26^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0637e3df17be8c3b41c1dc9b8d066d9d35044be3;p=platform%2Fkernel%2Flinux-starfive.git thunderbolt: Introduce tb_switch_is_tiger_lake() This is needed to differentiate Tiger Lake from other controllers. Signed-off-by: Gil Fine Signed-off-by: Mika Westerberg Reviewed-by: Greg Kroah-Hartman --- diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h index 1d5ee4c0de1c..3035258b3afa 100644 --- a/drivers/thunderbolt/tb.h +++ b/drivers/thunderbolt/tb.h @@ -770,6 +770,18 @@ static inline bool tb_switch_is_ice_lake(const struct tb_switch *sw) return false; } +static inline bool tb_switch_is_tiger_lake(const struct tb_switch *sw) +{ + if (sw->config.vendor_id == PCI_VENDOR_ID_INTEL) { + switch (sw->config.device_id) { + case PCI_DEVICE_ID_INTEL_TGL_NHI0: + case PCI_DEVICE_ID_INTEL_TGL_NHI1: + return true; + } + } + return false; +} + /** * tb_switch_is_usb4() - Is the switch USB4 compliant * @sw: Switch to check