linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv6 4/4] ARM: mx51: Add support for low power suspend on MX51
Date: Fri, 25 Mar 2011 08:30:54 +0100	[thread overview]
Message-ID: <20110325073054.GE7285@pengutronix.de> (raw)
In-Reply-To: <1300915676-10359-4-git-send-email-Dinh.Nguyen@freescale.com>

On Wed, Mar 23, 2011 at 04:27:56PM -0500, Dinh.Nguyen at freescale.com wrote:
> From: Dinh Nguyen <Dinh.Nguyen@freescale.com>
> 
> 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 |

      reply	other threads:[~2011-03-25  7:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-23 21:27 [PATCHv6 1/4] ARM: mx50: Add support to get the silicon revision Dinh.Nguyen at freescale.com
2011-03-23 21:27 ` [PATCHv6 2/4] ARM: mx51: Add entry for gpc_dvfs_clk Dinh.Nguyen at freescale.com
2011-03-23 21:27   ` [PATCHv6 3/4] ARM: mx51: Implement code to allow mx51 to enter WFI Dinh.Nguyen at freescale.com
2011-03-23 21:27     ` [PATCHv6 4/4] ARM: mx51: Add support for low power suspend on MX51 Dinh.Nguyen at freescale.com
2011-03-25  7:30       ` Sascha Hauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110325073054.GE7285@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).