lkml.org 
[lkml]   [2012]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 6/7] regualtor: Add samsung s2mps11 regulator driver
On Mon, Jun 18, 2012 at 08:29:41PM +0900, Sangbeom Kim wrote:

> +static int s2mps11_list_voltage(struct regulator_dev *rdev,
> + unsigned int selector)
> +{

Please take a look at the new helper functions which have been added to
the regulator core for factoring out things like table based and linear
maps. This and quite a bit of the rest of the code can probably be
converted to use those.

> + case S2MPS11_AP_EN32KHZ:
> + mask = 0x01;
> + break;
> + case S2MPS11_CP_EN32KHZ:
> + mask = 0x02;
> + break;
> + case S2MPS11_BT_EN32KHZ:
> + mask = 0x04;
> + break;

Use the clk API for clocks.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2012-06-18 15:21    [W:0.050 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site