lkml.org 
[lkml]   [2011]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/


\
 
 \ /
  Last update: 2011-10-03 17:51    [W:0.048 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site