Thread (5 messages) flat view 5 messages, 2 authors, 2011-03-25

[PATCHv6 4/4] ARM: mx51: Add support for low power suspend on MX51

From: s.hauer@pengutronix.de (Sascha Hauer)
Date: 2011-03-25 07:31:02
Also in: lkml

On Wed, Mar 23, 2011 at 04:27:56PM -0500, Dinh.Nguyen at freescale.com wrote:
From: Dinh Nguyen <redacted>

Adds initial low power suspend functionality to MX51.
Supports "mem" and "standby" modes.

+
+static int __init mx5_pm_init(void)
+{
+	if (gpc_dvfs_clk == NULL)
+		gpc_dvfs_clk = clk_get(NULL, "gpc_dvfs");
+
+	if (!IS_ERR(gpc_dvfs_clk)) {
+		if (cpu_is_mx51())
+			suspend_set_ops(&mx5_suspend_ops);
+	} else {
+		printk(KERN_ERR "Cannot enter SRPG suspend -no gpc_dvfs clock!\n");
+		return -EPERM;
This will print a warning on every non i.MX51 machine, not a good idea.
Please just bail out early on irrelevant machines.

Sascha
+	}
+
+	return 0;
+}
+device_initcall(mx5_pm_init);
-- 
1.6.0.4

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help