[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9207f78e-c555-483f-8db2-b1e7422f4f9a@nvidia.com>
Date: Fri, 23 Jan 2026 09:14:12 +0000
From: Jon Hunter <jonathanh@...dia.com>
To: Kartik Rajput <kkartik@...dia.com>, thierry.reding@...il.com,
jirislaby@...nel.org, pshete@...dia.com, chleroy@...nel.org,
linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] soc/tegra: pmc: Add PMC support for Tegra410
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
Powered by blists - more mailing lists