lkml.org 
[lkml]   [2018]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 05/14] ARM: OMAP2: Add functions to save and restore powerdomain context
* Keerthy <j-keerthy@ti.com> [180412 03:56]:
> From: Russ Dill <Russ.Dill@ti.com>
> --- a/arch/arm/mach-omap2/powerdomain.c
> +++ b/arch/arm/mach-omap2/powerdomain.c
> @@ -1199,3 +1199,63 @@ bool pwrdm_can_ever_lose_context(struct powerdomain *pwrdm)
>
> return 0;
> }
> +
> +/**
> + * pwrdm_save_context - save powerdomain registers
> + *
> + * Register state is going to be lost due to a suspend or hibernate
> + * event. Save the powerdomain registers.
> + */
> +static int pwrdm_save_context(struct powerdomain *pwrdm, void *unused)
> +{
> + if (arch_pwrdm && arch_pwrdm->pwrdm_save_context)
> + arch_pwrdm->pwrdm_save_context(pwrdm);
> + return 0;
> +}
> +
> +/**
> + * pwrdm_save_context - restore powerdomain registers
> + *
> + * Restore powerdomain control registers after a suspend or resume
> + * event.
> + */
> +static int pwrdm_restore_context(struct powerdomain *pwrdm, void *unused)
> +{
> + if (arch_pwrdm && arch_pwrdm->pwrdm_restore_context)
> + arch_pwrdm->pwrdm_restore_context(pwrdm);
> + return 0;
> +}

Here too we should use notifiers with the idea being that it allows making
powerdomains into a regular device driver eventually.

Regards,

Tony

\
 
 \ /
  Last update: 2018-04-12 16:38    [W:0.216 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site