Messages in this thread | | | Date | Mon, 3 Oct 2011 17:51:40 +0200 | From | Samuel Ortiz <> | 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/
| |