linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: linux-usb@vger.kernel.org
Cc: Michael Jamet <michael.jamet@intel.com>,
	Yehezkel Bernat <YehezkelShB@gmail.com>,
	Andreas Noever <andreas.noever@gmail.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Gil Fine <gil.fine@intel.com>, Lukas Wunner <lukas@wunner.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [PATCH 7/9] thunderbolt: Introduce tb_switch_is_tiger_lake()
Date: Wed, 26 Aug 2020 14:07:34 +0300	[thread overview]
Message-ID: <20200826110736.55186-8-mika.westerberg@linux.intel.com> (raw)
In-Reply-To: <20200826110736.55186-1-mika.westerberg@linux.intel.com>

From: Gil Fine <gil.fine@intel.com>

This is needed to differentiate Tiger Lake from other controllers.

Signed-off-by: Gil Fine <gil.fine@intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
 drivers/thunderbolt/tb.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

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
-- 
2.28.0


  parent reply	other threads:[~2020-08-26 11:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-26 11:07 [PATCH 0/9] thunderbolt: Add debugfs support Mika Westerberg
2020-08-26 11:07 ` [PATCH 1/9] thunderbolt: Move struct tb_cap_any to tb_regs.h Mika Westerberg
2020-08-26 11:07 ` [PATCH 2/9] thunderbolt: Introduce tb_port_next_cap() Mika Westerberg
2020-08-26 11:07 ` [PATCH 3/9] thunderbolt: Introduce tb_switch_next_cap() Mika Westerberg
2020-09-01  9:01   ` [PATCH v2 " Mika Westerberg
2020-08-26 11:07 ` [PATCH 4/9] thunderbolt: Introduce tb_port_is_nhi() Mika Westerberg
2020-08-26 11:07 ` [PATCH 5/9] thunderbolt: Check for Intel vendor ID when identifying controller Mika Westerberg
2020-08-26 11:07 ` [PATCH 6/9] thunderbolt: Introduce tb_switch_is_ice_lake() Mika Westerberg
2020-08-26 11:07 ` Mika Westerberg [this message]
2020-08-26 11:07 ` [PATCH 8/9] thunderbolt: No need to warn in TB_CFG_ERROR_INVALID_CONFIG_SPACE Mika Westerberg
2020-08-26 11:07 ` [PATCH 9/9] thunderbolt: Add debugfs interface Mika Westerberg
2020-08-26 11:22   ` Greg Kroah-Hartman
2020-08-26 11:40     ` Mika Westerberg
2020-09-03  9:27 ` [PATCH 0/9] thunderbolt: Add debugfs support Mika Westerberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200826110736.55186-8-mika.westerberg@linux.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=YehezkelShB@gmail.com \
    --cc=andreas.noever@gmail.com \
    --cc=gil.fine@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=michael.jamet@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).