From: Kevin Hilman <khilman@deeprootsystems.com>
To: Nishanth Menon <nm@ti.com>
Cc: linux-omap <linux-omap@vger.kernel.org>
Subject: Re: [PATCH] OMAP3:PM: reject disabled OPP
Date: Wed, 30 Sep 2009 09:46:37 -0700 [thread overview]
Message-ID: <87ws3gmlci.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1253920492-28628-1-git-send-email-nm@ti.com> (Nishanth Menon's message of "Fri\, 25 Sep 2009 18\:14\:52 -0500")
Nishanth Menon <nm@ti.com> writes:
> when the omap_opp structures are disabled by setting the
> frequency as 0 as below (as an example)
> {0, VDD2_OPP1, 0x1E},
> program_opp attempts to set voltage even after frequency
> setting fails. we can instead return if we see invalid
> values for either frequency or voltage
>
> Signed-off-by: Nishanth Menon <nm@ti.com>
Looks good, pushing to PM branch.
Kevin
> ---
> arch/arm/mach-omap2/resource34xx.c | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/resource34xx.c b/arch/arm/mach-omap2/resource34xx.c
> index 1693e9b..491e1dc 100644
> --- a/arch/arm/mach-omap2/resource34xx.c
> +++ b/arch/arm/mach-omap2/resource34xx.c
> @@ -282,6 +282,11 @@ static int program_opp(int res, struct omap_opp *opp, int target_level,
> t_opp = ID_VDD(res) | ID_OPP_NO(opp[target_level].opp_id);
> c_opp = ID_VDD(res) | ID_OPP_NO(opp[current_level].opp_id);
> #endif
> +
> + /* Sanity check of the OPP params before attempting to set */
> + if (!opp[target_level].rate || !opp[target_level].vsel)
> + return -EINVAL;
> +
> if (target_level > current_level)
> raise = 1;
> else
> --
> 1.6.0.4
prev parent reply other threads:[~2009-09-30 16:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-25 23:14 [PATCH] OMAP3:PM: reject disabled OPP Nishanth Menon
2009-09-30 16:46 ` Kevin Hilman [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=87ws3gmlci.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=linux-omap@vger.kernel.org \
--cc=nm@ti.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.