[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20111003155140.GO4118@sortiz-mobl>
Date: Mon, 3 Oct 2011 17:51:40 +0200
From: Samuel Ortiz <sameo@...ux.intel.com>
To: Linus Walleij <linus.walleij@...ricsson.com>
Cc: linux-kernel@...r.kernel.org, Lee Jones <lee.jones@...aro.org>,
Mattias Nilsson <mattias.i.nilsson@...ricsson.com>,
Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH 06/23] mfd/db8500-prcmu: add accessors for PLL and SGA
clock
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/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists