The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Samuel Ortiz <sameo@linux.intel.com>
To: Linus Walleij <linus.walleij@stericsson.com>
Cc: linux-kernel@vger.kernel.org, Lee Jones <lee.jones@linaro.org>,
	Mattias Nilsson <mattias.i.nilsson@stericsson.com>,
	Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH 06/23] mfd/db8500-prcmu: add accessors for PLL and SGA clock
Date: Mon, 3 Oct 2011 17:51:40 +0200	[thread overview]
Message-ID: <20111003155140.GO4118@sortiz-mobl> (raw)
In-Reply-To: <1313137698-30782-1-git-send-email-linus.walleij@stericsson.com>

Hi Linus,

On Fri, Aug 12, 2011 at 10:28:18AM +0200, Linus Walleij wrote:
>  int db8500_prcmu_request_clock(u8 clock, bool enable)
>  {
> -	if (clock < PRCMU_NUM_REG_CLOCKS)
> +	if (clock == PRCMU_SGACLK)
> +		return request_sga_clock(clock, enable);
> +	else if (clock < PRCMU_NUM_REG_CLOCKS)
>  		return request_reg_clock(clock, enable);
>  	else if (clock == PRCMU_TIMCLK)
>  		return request_timclk(enable);
>  	else if (clock == PRCMU_SYSCLK)
>  		return request_sysclk(enable);
> +	else if (clock == PRCMU_PLLSOC1)
> +		return request_pll(clock, enable);
>  	else
>  		return -EINVAL;
This looks like you're willing to use a switch case here (and default to
request_reg_clock() who would return -EINVAL if clock >=
PRCMU_NUM_REG_CLOCKS).

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

      reply	other threads:[~2011-10-03 15:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-12  8:28 [PATCH 06/23] mfd/db8500-prcmu: add accessors for PLL and SGA clock Linus Walleij
2011-10-03 15:51 ` Samuel Ortiz [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=20111003155140.GO4118@sortiz-mobl \
    --to=sameo@linux.intel.com \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mattias.i.nilsson@stericsson.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox