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.