From: Kartik Rajput <kkartik@nvidia.com>
To: Jon Hunter <jonathanh@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 12:21:34 +0530 [thread overview]
Message-ID: <f6718c48-e953-4e30-bd22-8e06f4fb157d@nvidia.com> (raw)
In-Reply-To: <80ed9e52-9173-4e7b-8df9-aefe7294904d@nvidia.com>
Hi Jon,
On 22/01/26 17:40, Jon Hunter wrote:
>
> On 22/01/2026 11:08, Kartik Rajput wrote:
>> Tegra410 uses PMC driver only to retrieve system reset reason using PMC
>> sysfs. Tegra410 uses ACPI to probe PMC, unlike device-tree boot it does
>> not use the early initialisation sequence.
>>
>> Add PMC support for Tegra410.
>
> Maybe ...
>
> "Add PMC support for Tegra410 which uses the PMC driver ..."
>
>
Ack.
...
>> +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.
Thanks,
Kartik
next prev parent reply other threads:[~2026-01-23 6:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-22 11:08 [PATCH] soc/tegra: pmc: Add PMC support for Tegra410 Kartik Rajput
2026-01-22 12:10 ` Jon Hunter
2026-01-23 6:51 ` Kartik Rajput [this message]
2026-01-23 9:14 ` Jon Hunter
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=f6718c48-e953-4e30-bd22-8e06f4fb157d@nvidia.com \
--to=kkartik@nvidia.com \
--cc=chleroy@kernel.org \
--cc=jirislaby@kernel.org \
--cc=jonathanh@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