[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YROdQXO4aVLQ8DkP@orome.fritz.box>
Date: Wed, 11 Aug 2021 11:49:53 +0200
From: Thierry Reding <thierry.reding@...il.com>
To: "Rafael J. Wysocki" <rjw@...ysocki.net>,
Daniel Lezcano <daniel.lezcano@...aro.org>
Cc: Jonathan Hunter <jonathanh@...dia.com>,
Dmitry Osipenko <digetx@...il.com>, linux-pm@...r.kernel.org,
linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 2/2] cpuidle: tegra: Check whether PMC is ready
On Mon, Jul 19, 2021 at 12:27:06AM +0300, Dmitry Osipenko wrote:
> Check whether PMC is ready before proceeding with the cpuidle registration.
> This fixes racing with the PMC driver probe order, which results in a
> disabled deepest CC6 idling state if cpuidle driver is probed before the
> PMC.
>
> Signed-off-by: Dmitry Osipenko <digetx@...il.com>
> ---
> drivers/cpuidle/cpuidle-tegra.c | 3 +++
> 1 file changed, 3 insertions(+)
Rafael, Daniel,
would you mind if I took this into the Tegra tree? It's got a dependency
on the PMC driver, which usually goes via the Tegra tree already, and
there's nothing cpuidle-specific in here, it's all Tegra-specific
integration quirks.
Thierry
>
> diff --git a/drivers/cpuidle/cpuidle-tegra.c b/drivers/cpuidle/cpuidle-tegra.c
> index 508bd9f23792..9845629aeb6d 100644
> --- a/drivers/cpuidle/cpuidle-tegra.c
> +++ b/drivers/cpuidle/cpuidle-tegra.c
> @@ -337,6 +337,9 @@ static void tegra_cpuidle_setup_tegra114_c7_state(void)
>
> static int tegra_cpuidle_probe(struct platform_device *pdev)
> {
> + if (tegra_pmc_get_suspend_mode() == TEGRA_SUSPEND_NOT_READY)
> + return -EPROBE_DEFER;
> +
> /* LP2 could be disabled in device-tree */
> if (tegra_pmc_get_suspend_mode() < TEGRA_SUSPEND_LP2)
> tegra_cpuidle_disable_state(TEGRA_CC6);
> --
> 2.32.0
>
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists