[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240610042250.xccda2pr277v6asf@vireshk-i7>
Date: Mon, 10 Jun 2024 09:52:50 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Primoz Fiser <primoz.fiser@...ik.com>
Cc: Viresh Kumar <vireshk@...nel.org>, Nishanth Menon <nm@...com>,
Stephen Boyd <sboyd@...nel.org>, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, upstream@...ts.phytec.de
Subject: Re: [PATCH 2/2] OPP: ti: Use devm_pm_opp_set_config_regulators
Hi Primoz,
Thanks for your changes, they look exactly as we discussed earlier, but ..
On 06-06-24, 13:33, Primoz Fiser wrote:
> Function ti_opp_supply_probe() since commit 6baee034cb55 ("OPP: ti:
> Migrate to dev_pm_opp_set_config_regulators()") returns wrong values
> when all goes well and hence driver probing eventually fails.
>
> Switch to using devm_pm_opp_set_config_regulators() function that
> correctly handles return values and doesn't require us to handle
> returned tokens.
>
> Fixes: 6baee034cb55 ("OPP: ti: Migrate to dev_pm_opp_set_config_regulators()")
> Signed-off-by: Primoz Fiser <primoz.fiser@...ik.com>
> ---
> drivers/opp/ti-opp-supply.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/opp/ti-opp-supply.c b/drivers/opp/ti-opp-supply.c
> index e3b97cd1fbbf..8a4bcc5fb9dc 100644
> --- a/drivers/opp/ti-opp-supply.c
> +++ b/drivers/opp/ti-opp-supply.c
> @@ -392,7 +392,7 @@ static int ti_opp_supply_probe(struct platform_device *pdev)
> return ret;
> }
>
> - ret = dev_pm_opp_set_config_regulators(cpu_dev, ti_opp_config_regulators);
> + ret = devm_pm_opp_set_config_regulators(cpu_dev, ti_opp_config_regulators);
> if (ret < 0)
> _free_optimized_voltages(dev, &opp_data);
-- I made a mistake.
The driver gets probed with a platform device, while
devm_pm_opp_set_config_regulators() works with cpu device. And so the
issue related to module insertion/removal/insertion will still be
there :(.
Did you try that though ?
The only way to get this solved is probably by introducing a remove()
method, which clears the OPP config and stores the token returned by
dev_pm_opp_set_config_regulators().
--
viresh
Powered by blists - more mailing lists