diff mbox series

[v2] pmdomain: ti-sci: set the GENPD_FLAG_ACTIVE_WAKEUP flag for all PM domains

Message ID 20241022-8250-omap-no-console-suspend-v2-1-cc3d102b8a1e@bootlin.com (mailing list archive)
State New, archived
Headers show
Series [v2] pmdomain: ti-sci: set the GENPD_FLAG_ACTIVE_WAKEUP flag for all PM domains | expand

Commit Message

Thomas Richard Oct. 22, 2024, 8:23 a.m. UTC
With this flag, if a device is marked on the wakeup path, the corresponding
PM domain is kept powered on.

This commit fixes the no_console_suspend support for some TI platforms
(tested on J7200). In case of no_console_suspend the serial core marks the
device on the wakeup path, but without this patch the power domain is
powered off anyway.

Suggested-by: Théo Lebrun <theo.lebrun@bootlin.com>
Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
---
This is the second version of the series to fix no_console_suspend in the
8250_omap driver.
For this second version, the patch 2/2 "serial: 8250_omap: mark the serial
as on the wakeup path if no_console_suspend" was removed. No need to mark
the serial as on the wakeup path from the driver, as it is already done by
the serial core [1].

Regards,

Thomas

[1] https://elixir.bootlin.com/linux/v6.12-rc3/source/drivers/tty/serial/serial_core.c#L2407
---
Changes in v2:
- remove patch 2/2 "serial: 8250_omap: mark the serial as on the wakeup
  path if no_console_suspend"
- Link to v1: https://lore.kernel.org/r/20241008-8250-omap-no-console-suspend-v1-0-e7f0365c02f0@bootlin.com
---
 drivers/pmdomain/ti/ti_sci_pm_domains.c | 1 +
 1 file changed, 1 insertion(+)


---
base-commit: eec50dadcc91583e08dcabdf83147f6538831b5f
change-id: 20240819-8250-omap-no-console-suspend-1073308d3714

Best regards,

Comments

Ulf Hansson Oct. 22, 2024, 11:14 a.m. UTC | #1
On Tue, 22 Oct 2024 at 10:23, Thomas Richard <thomas.richard@bootlin.com> wrote:
>
> With this flag, if a device is marked on the wakeup path, the corresponding
> PM domain is kept powered on.
>
> This commit fixes the no_console_suspend support for some TI platforms
> (tested on J7200). In case of no_console_suspend the serial core marks the
> device on the wakeup path, but without this patch the power domain is
> powered off anyway.
>
> Suggested-by: Théo Lebrun <theo.lebrun@bootlin.com>
> Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>

Applied for next, thanks!

Kind regards
Uffe


> ---
> This is the second version of the series to fix no_console_suspend in the
> 8250_omap driver.
> For this second version, the patch 2/2 "serial: 8250_omap: mark the serial
> as on the wakeup path if no_console_suspend" was removed. No need to mark
> the serial as on the wakeup path from the driver, as it is already done by
> the serial core [1].
>
> Regards,
>
> Thomas
>
> [1] https://elixir.bootlin.com/linux/v6.12-rc3/source/drivers/tty/serial/serial_core.c#L2407
> ---
> Changes in v2:
> - remove patch 2/2 "serial: 8250_omap: mark the serial as on the wakeup
>   path if no_console_suspend"
> - Link to v1: https://lore.kernel.org/r/20241008-8250-omap-no-console-suspend-v1-0-e7f0365c02f0@bootlin.com
> ---
>  drivers/pmdomain/ti/ti_sci_pm_domains.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pmdomain/ti/ti_sci_pm_domains.c b/drivers/pmdomain/ti/ti_sci_pm_domains.c
> index 1510d5ddae3d..38448b4a035a 100644
> --- a/drivers/pmdomain/ti/ti_sci_pm_domains.c
> +++ b/drivers/pmdomain/ti/ti_sci_pm_domains.c
> @@ -186,6 +186,7 @@ static int ti_sci_pm_domain_probe(struct platform_device *pdev)
>
>                                 pd->pd.power_off = ti_sci_pd_power_off;
>                                 pd->pd.power_on = ti_sci_pd_power_on;
> +                               pd->pd.flags |= GENPD_FLAG_ACTIVE_WAKEUP;
>                                 pd->idx = args.args[0];
>                                 pd->parent = pd_provider;
>
>
> ---
> base-commit: eec50dadcc91583e08dcabdf83147f6538831b5f
> change-id: 20240819-8250-omap-no-console-suspend-1073308d3714
>
> Best regards,
> --
> Thomas Richard <thomas.richard@bootlin.com>
>
Kevin Hilman Oct. 22, 2024, 4:24 p.m. UTC | #2
Thomas Richard <thomas.richard@bootlin.com> writes:

> With this flag, if a device is marked on the wakeup path, the corresponding
> PM domain is kept powered on.
>
> This commit fixes the no_console_suspend support for some TI platforms
> (tested on J7200). In case of no_console_suspend the serial core marks the
> device on the wakeup path, but without this patch the power domain is
> powered off anyway.
>
> Suggested-by: Théo Lebrun <theo.lebrun@bootlin.com>
> Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>

Reviewed-by: Kevin Hilman <khilman@baylibre.com>
diff mbox series

Patch

diff --git a/drivers/pmdomain/ti/ti_sci_pm_domains.c b/drivers/pmdomain/ti/ti_sci_pm_domains.c
index 1510d5ddae3d..38448b4a035a 100644
--- a/drivers/pmdomain/ti/ti_sci_pm_domains.c
+++ b/drivers/pmdomain/ti/ti_sci_pm_domains.c
@@ -186,6 +186,7 @@  static int ti_sci_pm_domain_probe(struct platform_device *pdev)
 
 				pd->pd.power_off = ti_sci_pd_power_off;
 				pd->pd.power_on = ti_sci_pd_power_on;
+				pd->pd.flags |= GENPD_FLAG_ACTIVE_WAKEUP;
 				pd->idx = args.args[0];
 				pd->parent = pd_provider;