Thread (28 messages) 28 messages, 5 authors, 2015-01-27

[PATCH v2 07/12] pm: at91: the standby mode uses the same sram function as the suspend to memory mode

From: Yang, Wenyou <hidden>
Date: 2015-01-27 04:45:22
Also in: lkml

Hi Sylvain,
-----Original Message-----
From: Sylvain Rochet [mailto:sylvain.rochet at finsecur.com]
Sent: Monday, January 26, 2015 6:10 PM
To: Yang, Wenyou
Cc: Ferre, Nicolas; linux at arm.linux.org.uk; linux-arm-kernel at lists.infradead.org;
linux-kernel at vger.kernel.org; alexandre.belloni at free-electrons.com;
peda at axentia.se
Subject: Re: [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:
quoted
+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:
Accepted. Thanks
quoted
 static int at91_pm_enter(suspend_state_t state)  {
 	at91_pinctrl_gpio_suspend();

 	switch (state) {
     (...)
quoted
+	case PM_SUSPEND_MEM:
	/*
	 * Ensure that clocks are in a valid state.
	 */
	if (!at91_pm_verify_clocks())
		goto error;
	/* FALLTHROUGH */
quoted
+	case PM_SUSPEND_STANDBY:
 		/*
-		 * Suspend-to-RAM is like STANDBY plus slow clock mode, so

Sylvain
Best Regards,
Wenyou Yang
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help