lkml.org 
[lkml]   [2015]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 07/12] pm: at91: the standby mode uses the same sram function as the suspend to memory mode
Hello Wenyou,


On Mon, Jan 26, 2015 at 05:42:11PM +0800, Wenyou Yang wrote:
> +static int at91_pm_verify_clocks(suspend_state_t state)
> {
> unsigned long scsr;
> int i;
>
> + /* For PM_SUSPEND_STANDBY, skip verifying the clock */
> + if (state == PM_SUSPEND_STANDBY)
> + return 1;
> +

In my opinion we should use the select() already in place in
at91_pm_enter() to do that:

> static int at91_pm_enter(suspend_state_t state)
> {
> at91_pinctrl_gpio_suspend();
>
> switch (state) {
(...)
> + case PM_SUSPEND_MEM:

/*
* Ensure that clocks are in a valid state.
*/
if (!at91_pm_verify_clocks())
goto error;
/* FALLTHROUGH */

> + case PM_SUSPEND_STANDBY:
> /*
> - * Suspend-to-RAM is like STANDBY plus slow clock mode, so


Sylvain


\
 
 \ /
  Last update: 2015-01-26 11:21    [W:0.138 / U:0.976 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site