From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
To: linux-kernel@vger.kernel.org
Cc: linux-amarula@amarulasolutions.com,
"Dario Binacchi" <dario.binacchi@amarulasolutions.com>,
"Fabio Estevam" <festevam@gmail.com>,
"Heiko Stuebner" <heiko@sntech.de>, "Peng Fan" <peng.fan@nxp.com>,
"Pengutronix Kernel Team" <kernel@pengutronix.de>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Sascha Hauer" <s.hauer@pengutronix.de>,
"Shawn Guo" <shawnguo@kernel.org>,
"Ulf Hansson" <ulf.hansson@linaro.org>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-pm@vger.kernel.org
Subject: [PATCH v2 2/3] pmdomain: imx93-pd: don't unprepare clocks on driver remove
Date: Sun, 25 Aug 2024 16:34:01 +0200 [thread overview]
Message-ID: <20240825143428.556439-2-dario.binacchi@amarulasolutions.com> (raw)
In-Reply-To: <20240825143428.556439-1-dario.binacchi@amarulasolutions.com>
The removed code was added to handle the case where the power domain is
already on during the driver's probing. In this use case, the "is_off"
parameter is passed as false to pm_genpd_init() to inform it not to call
the power_on() callback, as it's unnecessary to perform the hardware
power-on procedure since the power domain is already on. Therefore, with
the call to clk_bulk_prepare_enable() by probe(), the system is in the
same operational state as when "is_off" is passed as true after the
power_on() callback execution:
probe() -> is_off == true -> clk_bulk_prepare_enable() called by power_on()
probe() -> is_off == false -> clk_bulk_prepare_enable() called by probe()
Reaching the same logical and operational state, it follows that upon
driver removal, there is no need to perform different actions depending
on the power domain's on/off state during probing.
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
(no changes since v1)
drivers/pmdomain/imx/imx93-pd.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/pmdomain/imx/imx93-pd.c b/drivers/pmdomain/imx/imx93-pd.c
index 44daecbe5cc3..fb53a8e359bc 100644
--- a/drivers/pmdomain/imx/imx93-pd.c
+++ b/drivers/pmdomain/imx/imx93-pd.c
@@ -90,9 +90,6 @@ static void imx93_pd_remove(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node;
- if (!domain->init_off)
- clk_bulk_disable_unprepare(domain->num_clks, domain->clks);
-
of_genpd_del_provider(np);
pm_genpd_remove(&domain->genpd);
}
--
2.43.0
next prev parent reply other threads:[~2024-08-25 14:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-25 14:34 [PATCH v2 1/3] pmdomain: imx93-pd: replace dev_err() with dev_err_probe() Dario Binacchi
2024-08-25 14:34 ` Dario Binacchi [this message]
2024-09-13 12:01 ` [PATCH v2 2/3] pmdomain: imx93-pd: don't unprepare clocks on driver remove Ulf Hansson
2024-08-25 14:34 ` [PATCH v2 3/3] pmdomain: imx93-pd: drop the context variable "init_off" Dario Binacchi
2024-09-13 12:01 ` Ulf Hansson
2024-09-03 16:26 ` [PATCH v2 1/3] pmdomain: imx93-pd: replace dev_err() with dev_err_probe() Uwe Kleine-König
2024-09-13 12:01 ` Ulf Hansson
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=20240825143428.556439-2-dario.binacchi@amarulasolutions.com \
--to=dario.binacchi@amarulasolutions.com \
--cc=festevam@gmail.com \
--cc=heiko@sntech.de \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=linux-amarula@amarulasolutions.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=peng.fan@nxp.com \
--cc=rafael@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
--cc=ulf.hansson@linaro.org \
/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®