]> www.infradead.org Git - users/willy/xarray.git/commit
pmdomain: imx93-pd: don't unprepare clocks on driver remove
authorDario Binacchi <dario.binacchi@amarulasolutions.com>
Sun, 25 Aug 2024 14:34:01 +0000 (16:34 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Fri, 13 Sep 2024 10:45:39 +0000 (12:45 +0200)
commit28717ec8b948eedca5855ac4f587b45bcb1d57e5
treedabd2e37c3ae7badf8dab2410c51d3e19f32c69c
parent06cee3c6b3844b0ee46dc15ce1bf938eeba2bb28
pmdomain: imx93-pd: don't unprepare clocks on driver remove

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>
Link: https://lore.kernel.org/r/20240825143428.556439-2-dario.binacchi@amarulasolutions.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/pmdomain/imx/imx93-pd.c