From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: linux-usb@vger.kernel.org
Cc: Yehezkel Bernat <YehezkelShB@gmail.com>,
Michael Jamet <michael.jamet@intel.com>,
Lukas Wunner <lukas@wunner.de>,
Andreas Noever <andreas.noever@gmail.com>,
Gil Fine <gil.fine@linux.intel.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>
Subject: [PATCH 03/13] thunderbolt: Make tb_switch_clx_is_supported() static
Date: Tue, 3 Oct 2023 12:39:55 +0300 [thread overview]
Message-ID: <20231003094005.2676823-4-mika.westerberg@linux.intel.com> (raw)
In-Reply-To: <20231003094005.2676823-1-mika.westerberg@linux.intel.com>
This function is not used outside of clx.c so make it static. No
functional changes.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
drivers/thunderbolt/clx.c | 44 +++++++++++++++++++--------------------
drivers/thunderbolt/tb.h | 1 -
2 files changed, 22 insertions(+), 23 deletions(-)
diff --git a/drivers/thunderbolt/clx.c b/drivers/thunderbolt/clx.c
index 13d217ae98e6..c08b9cf0371e 100644
--- a/drivers/thunderbolt/clx.c
+++ b/drivers/thunderbolt/clx.c
@@ -174,6 +174,28 @@ bool tb_port_clx_is_enabled(struct tb_port *port, unsigned int clx)
return !!(tb_port_clx(port) & clx);
}
+/**
+ * tb_switch_clx_is_supported() - Is CLx supported on this type of router
+ * @sw: The router to check CLx support for
+ */
+static bool tb_switch_clx_is_supported(const struct tb_switch *sw)
+{
+ if (!clx_enabled)
+ return false;
+
+ if (sw->quirks & QUIRK_NO_CLX)
+ return false;
+
+ /*
+ * CLx is not enabled and validated on Intel USB4 platforms
+ * before Alder Lake.
+ */
+ if (tb_switch_is_tiger_lake(sw))
+ return false;
+
+ return tb_switch_is_usb4(sw) || tb_switch_is_titan_ridge(sw);
+}
+
/**
* tb_switch_clx_init() - Initialize router CL states
* @sw: Router
@@ -273,28 +295,6 @@ static int tb_switch_mask_clx_objections(struct tb_switch *sw)
sw->cap_lp + offset, ARRAY_SIZE(val));
}
-/**
- * tb_switch_clx_is_supported() - Is CLx supported on this type of router
- * @sw: The router to check CLx support for
- */
-bool tb_switch_clx_is_supported(const struct tb_switch *sw)
-{
- if (!clx_enabled)
- return false;
-
- if (sw->quirks & QUIRK_NO_CLX)
- return false;
-
- /*
- * CLx is not enabled and validated on Intel USB4 platforms
- * before Alder Lake.
- */
- if (tb_switch_is_tiger_lake(sw))
- return false;
-
- return tb_switch_is_usb4(sw) || tb_switch_is_titan_ridge(sw);
-}
-
static bool validate_mask(unsigned int clx)
{
/* Previous states need to be enabled */
diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h
index 06046f8ce50c..6f15b3a3e990 100644
--- a/drivers/thunderbolt/tb.h
+++ b/drivers/thunderbolt/tb.h
@@ -1001,7 +1001,6 @@ static inline bool tb_switch_tmu_is_enabled(const struct tb_switch *sw)
bool tb_port_clx_is_enabled(struct tb_port *port, unsigned int clx);
int tb_switch_clx_init(struct tb_switch *sw);
-bool tb_switch_clx_is_supported(const struct tb_switch *sw);
int tb_switch_clx_enable(struct tb_switch *sw, unsigned int clx);
int tb_switch_clx_disable(struct tb_switch *sw);
--
2.40.1
next prev parent reply other threads:[~2023-10-03 9:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-03 9:39 [PATCH 00/13] thunderbolt: DisplayPort and logging improvements & cleanups Mika Westerberg
2023-10-03 9:39 ` [PATCH 01/13] thunderbolt: dma_test: Use enum tb_link_width Mika Westerberg
2023-10-03 9:39 ` [PATCH 02/13] thunderbolt: Get rid of usb4_usb3_port_actual_link_rate() Mika Westerberg
2023-10-03 9:39 ` Mika Westerberg [this message]
2023-10-03 9:39 ` [PATCH 04/13] thunderbolt: Check for unplugged router in tb_switch_clx_disable() Mika Westerberg
2023-10-03 9:39 ` [PATCH 05/13] thunderbolt: Fix debug log when DisplayPort adapter not available for pairing Mika Westerberg
2023-10-03 9:39 ` [PATCH 06/13] thunderbolt: Fix typo in enum tb_link_width kernel-doc Mika Westerberg
2023-10-03 9:39 ` [PATCH 07/13] thunderbolt: Fix typo of HPD bit for Hot Plug Detect Mika Westerberg
2023-10-03 9:40 ` [PATCH 08/13] thunderbolt: Use tb_tunnel_dbg() where possible to make logging more consistent Mika Westerberg
2023-10-03 9:40 ` [PATCH 09/13] thunderbolt: Expose tb_tunnel_xxx() log macros to the rest of the driver Mika Westerberg
2023-10-03 9:40 ` [PATCH 10/13] thunderbolt: Use tb_tunnel_xxx() log macros in tb.c Mika Westerberg
2023-10-03 9:40 ` [PATCH 11/13] thunderbolt: Log NVM version of routers and retimers Mika Westerberg
2023-10-03 9:40 ` [PATCH 12/13] thunderbolt: Create multiple DisplayPort tunnels if there are more DP IN/OUT pairs Mika Westerberg
2023-10-03 9:40 ` [PATCH 13/13] thunderbolt: Add DP IN added last in the head of the list of DP resources Mika Westerberg
2023-10-13 5:55 ` [PATCH 00/13] thunderbolt: DisplayPort and logging improvements & cleanups 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=20231003094005.2676823-4-mika.westerberg@linux.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=YehezkelShB@gmail.com \
--cc=andreas.noever@gmail.com \
--cc=gil.fine@linux.intel.com \
--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).