From: Jon Hunter <jonathanh@nvidia.com>
To: Thierry Reding <thierry.reding@kernel.org>
Cc: Vinod Koul <vkoul@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Manivannan Sadhasivam <mani@kernel.org>,
JC Kuo <jckuo@nvidia.com>,
linux-phy@lists.infradead.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] phy: tegra: Clean-up Makefile for Tegra186
Date: Tue, 13 Oct 2026 19:17:55 +0100 [thread overview]
Message-ID: <3a37bd0d-104d-4c27-a97e-dca6a3f53aa4@nvidia.com> (raw)
In-Reply-To: <as5WkN6Wt08TeRax@orome>
On 13/10/2026 17:07, Thierry Reding wrote:
> On Mon, Oct 12, 2026 at 12:16:31PM +0100, Jon Hunter wrote:
>> 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>
...
>> 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,
>
> And this means you now get data for all SoCs as soon as one of them is
> enabled. Yes, I know that most of the time we want to build multi-SoC
> kernels anyway, but it now is not just a clean up anymore.
So you already get all the data for all the SoCs. This is simply
populating the compatible string and pointer for the data structure in
the match table.
Prior to commit 8f56fdf3d8cb ("phy: tegra: Add support for Tegra238 XUSB
pad controller") it was possible to only have some of the SoC data
present, however, due to all the inter-dependencies between all the
underlying structures, IMO it became pointless and messy.
So I still see this as a clean-up overall.
Jon
--
nvpublic
prev parent reply other threads:[~2026-10-13 18:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-12 11:16 [PATCH] phy: tegra: Clean-up Makefile for Tegra186 Jon Hunter
2026-10-13 16:07 ` Thierry Reding
2026-10-13 18:17 ` Jon Hunter [this message]
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=3a37bd0d-104d-4c27-a97e-dca6a3f53aa4@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