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 |