From: Jon Hunter <jonathanh@nvidia.com>
To: Kartik Rajput <kkartik@nvidia.com>,
thierry.reding@gmail.com, jirislaby@kernel.org,
pshete@nvidia.com, chleroy@kernel.org,
linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] soc/tegra: pmc: Add PMC support for Tegra410
Date: Fri, 23 Jan 2026 09:14:12 +0000 [thread overview]
Message-ID: <9207f78e-c555-483f-8db2-b1e7422f4f9a@nvidia.com> (raw)
In-Reply-To: <f6718c48-e953-4e30-bd22-8e06f4fb157d@nvidia.com>
On 23/01/2026 06:51, Kartik Rajput wrote:
...
>>> +static int tegra_pmc_acpi_probe(struct platform_device *pdev)
>>> +{
>>> + pmc->soc = device_get_match_data(&pdev->dev);
>>> + pmc->dev = &pdev->dev;
>>> +
>>> + pmc->base = devm_platform_ioremap_resource(pdev, 0);
>>> + if (IS_ERR(pmc->base))
>>> + return PTR_ERR(pmc->base);
>>> +
>>> + tegra_pmc_reset_sysfs_init(pmc);
>>> + platform_set_drvdata(pdev, pmc);
>>> +
>>> + return 0;
>>> +}
>>
>> Should we just define a tegra_pmc_probe_common() that is used for both
>> DT and ACPI? The above is not specific to ACPI.
>>
> Do you mean something like?
>
> tegra_pmc_probe() {
> void __iomem *base;
>
> tegra_pmc_probe_common(dev, &base);
>
> if (is_acpi_node()) {
> pmc->base = base;
> return 0;
> }
>
> ...
>
> // Continue DT specific initialisation.
>
> ...
>
> // Clean-up early pmc->base mapping once the probe is successful.
>
> unmap(pmc->base)
> pmc->base = base;
> }
>
> We can do this, but this will introduce some churn in the probe.
> Having a separate tegra_pmc_acpi_probe() avoids this and keeps things neat.
You are right because of this early 'base' handling. OK leave as is for
now and we will see what Thierry thinks.
Jon
--
nvpublic
prev parent reply other threads:[~2026-01-23 9:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-22 11:08 Kartik Rajput
2026-01-22 12:10 ` Jon Hunter
2026-01-23 6:51 ` Kartik Rajput
2026-01-23 9:14 ` 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=9207f78e-c555-483f-8db2-b1e7422f4f9a@nvidia.com \
--to=jonathanh@nvidia.com \
--cc=chleroy@kernel.org \
--cc=jirislaby@kernel.org \
--cc=kkartik@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=pshete@nvidia.com \
--cc=thierry.reding@gmail.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
all inboxes | Powered by JetHome®