From: Jon Hunter <jonathanh@nvidia.com>
To: Vinod Koul <vkoul@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Manivannan Sadhasivam <mani@kernel.org>,
Thierry Reding <thierry.reding@kernel.org>,
JC Kuo <jckuo@nvidia.com>
Cc: <linux-phy@lists.infradead.org>, <linux-tegra@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, Jon Hunter <jonathanh@nvidia.com>
Subject: [PATCH] phy: tegra: Clean-up Makefile for Tegra186
Date: Mon, 12 Oct 2026 12:16:31 +0100 [thread overview]
Message-ID: <20261012-tegra-phy-v1-1-3241bf3c86e9@nvidia.com> (raw)
The Makefile for the Tegra XUSB PHY driver has an entry for every Tegra
SoC that compiles the xusb-tegra186.c file. Clean this up by adding a
new Kconfig option called PHY_TEGRA186_XUSB that when defined compiles
the xusb-tegra186.c file.
Finally, update the xusb.[ch] files to use this new config option as
well instead of using the individual SoC Kconfig options.
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
drivers/phy/tegra/Kconfig | 6 ++++++
drivers/phy/tegra/Makefile | 6 +-----
drivers/phy/tegra/xusb.c | 10 +---------
drivers/phy/tegra/xusb.h | 10 +---------
4 files changed, 9 insertions(+), 23 deletions(-)
diff --git a/drivers/phy/tegra/Kconfig b/drivers/phy/tegra/Kconfig
index b5ed5bc0c8ef..bc14c1c443b1 100644
--- a/drivers/phy/tegra/Kconfig
+++ b/drivers/phy/tegra/Kconfig
@@ -11,6 +11,12 @@ config PHY_TEGRA_XUSB
To compile this driver as a module, choose M here: the module will
be called phy-tegra-xusb.
+config PHY_TEGRA186_XUSB
+ bool
+ default y if ARCH_TEGRA_186_SOC || ARCH_TEGRA_194_SOC || \
+ ARCH_TEGRA_234_SOC || ARCH_TEGRA_238_SOC || \
+ ARCH_TEGRA_264_SOC
+
config PHY_TEGRA194_P2U
tristate "NVIDIA Tegra194 PIPE2UPHY PHY driver"
depends on ARCH_TEGRA || COMPILE_TEST
diff --git a/drivers/phy/tegra/Makefile b/drivers/phy/tegra/Makefile
index 018a4cab2b40..7d9c05149d6b 100644
--- a/drivers/phy/tegra/Makefile
+++ b/drivers/phy/tegra/Makefile
@@ -5,10 +5,6 @@ phy-tegra-xusb-y += xusb.o
phy-tegra-xusb-$(CONFIG_ARCH_TEGRA_124_SOC) += xusb-tegra124.o
phy-tegra-xusb-$(CONFIG_ARCH_TEGRA_132_SOC) += xusb-tegra124.o
phy-tegra-xusb-$(CONFIG_ARCH_TEGRA_210_SOC) += xusb-tegra210.o
-phy-tegra-xusb-$(CONFIG_ARCH_TEGRA_186_SOC) += xusb-tegra186.o
-phy-tegra-xusb-$(CONFIG_ARCH_TEGRA_194_SOC) += xusb-tegra186.o
-phy-tegra-xusb-$(CONFIG_ARCH_TEGRA_234_SOC) += xusb-tegra186.o
-phy-tegra-xusb-$(CONFIG_ARCH_TEGRA_238_SOC) += xusb-tegra186.o
-phy-tegra-xusb-$(CONFIG_ARCH_TEGRA_264_SOC) += xusb-tegra186.o
+phy-tegra-xusb-$(CONFIG_PHY_TEGRA186_XUSB) += xusb-tegra186.o
obj-$(CONFIG_PHY_TEGRA194_P2U) += phy-tegra194-p2u.o
obj-$(CONFIG_PHY_TEGRA_MPHY) += phy-tegra-mphy.o
diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c
index 89ce9ac87300..79a3624faa10 100644
--- a/drivers/phy/tegra/xusb.c
+++ b/drivers/phy/tegra/xusb.c
@@ -60,31 +60,23 @@ static const struct of_device_id tegra_xusb_padctl_of_match[] = {
.data = &tegra210_xusb_padctl_soc,
},
#endif
-#if defined(CONFIG_ARCH_TEGRA_186_SOC)
+#if defined(CONFIG_PHY_TEGRA186_XUSB)
{
.compatible = "nvidia,tegra186-xusb-padctl",
.data = &tegra186_xusb_padctl_soc,
},
-#endif
-#if defined(CONFIG_ARCH_TEGRA_194_SOC)
{
.compatible = "nvidia,tegra194-xusb-padctl",
.data = &tegra194_xusb_padctl_soc,
},
-#endif
-#if defined(CONFIG_ARCH_TEGRA_234_SOC)
{
.compatible = "nvidia,tegra234-xusb-padctl",
.data = &tegra234_xusb_padctl_soc,
},
-#endif
-#if defined(CONFIG_ARCH_TEGRA_238_SOC)
{
.compatible = "nvidia,tegra238-xusb-padctl",
.data = &tegra238_xusb_padctl_soc,
},
-#endif
-#if defined(CONFIG_ARCH_TEGRA_264_SOC)
{
.compatible = "nvidia,tegra264-xusb-padctl",
.data = &tegra264_xusb_padctl_soc,
diff --git a/drivers/phy/tegra/xusb.h b/drivers/phy/tegra/xusb.h
index b9de4f3b5781..086bb2d09bda 100644
--- a/drivers/phy/tegra/xusb.h
+++ b/drivers/phy/tegra/xusb.h
@@ -505,19 +505,11 @@ extern const struct tegra_xusb_padctl_soc tegra124_xusb_padctl_soc;
#if defined(CONFIG_ARCH_TEGRA_210_SOC)
extern const struct tegra_xusb_padctl_soc tegra210_xusb_padctl_soc;
#endif
-#if defined(CONFIG_ARCH_TEGRA_186_SOC)
+#if defined(CONFIG_PHY_TEGRA186_XUSB)
extern const struct tegra_xusb_padctl_soc tegra186_xusb_padctl_soc;
-#endif
-#if defined(CONFIG_ARCH_TEGRA_194_SOC)
extern const struct tegra_xusb_padctl_soc tegra194_xusb_padctl_soc;
-#endif
-#if defined(CONFIG_ARCH_TEGRA_234_SOC)
extern const struct tegra_xusb_padctl_soc tegra234_xusb_padctl_soc;
-#endif
-#if defined(CONFIG_ARCH_TEGRA_238_SOC)
extern const struct tegra_xusb_padctl_soc tegra238_xusb_padctl_soc;
-#endif
-#if defined(CONFIG_ARCH_TEGRA_264_SOC)
extern const struct tegra_xusb_padctl_soc tegra264_xusb_padctl_soc;
#endif
---
base-commit: becb95e45ef0dda9ffb35156d909d3da7a2789c3
change-id: 20261012-tegra-phy-e951c11e733c
Best regards,
--
Jon Hunter <jonathanh@nvidia.com>
reply other threads:[~2026-10-12 11:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261012-tegra-phy-v1-1-3241bf3c86e9@nvidia.com \
--to=jonathanh@nvidia.com \
--cc=jckuo@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mani@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=thierry.reding@kernel.org \
--cc=vkoul@kernel.org \
/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
all inboxes | Powered by JetHome®