lkml.org 
[lkml]   [2013]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2/4] regulator: s2mps11: Implement set_voltage_time_sel() ops for bucks
From
On Wed, Jul 3, 2013 at 5:25 PM, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> On 24 June 2013 16:50, Yadwinder Singh Brar <yadi.brar@samsung.com> wrote:
>> Currently driver uses local struct s2mps11_info to store ramp rate for bucks
>> whic its getting through platform data, so instead of using regulator
>> constraints it should use s2mps11_info to calculate ramp delay.
>>
>> Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com>
> [snip]
>> +
>> + switch (rdev->desc->id) {
>> + case S2MPS11_BUCK2:
>> + if (!s2mps11->buck2_ramp)
>> + return 0;
>> + ramp_delay = s2mps11->ramp_delay2;
>> + break;
>> + case S2MPS11_BUCK3:
>> + if (!s2mps11->buck3_ramp)
>> + return 0;
>> + ramp_delay = s2mps11->ramp_delay34;
>> + break;
>> + case S2MPS11_BUCK4:
>> + if (!s2mps11->buck4_ramp)
>> + return 0;
>> + ramp_delay = s2mps11->ramp_delay34;
>> + break;
>> + case S2MPS11_BUCK5:
>> + ramp_delay = s2mps11->ramp_delay5;
>> + break;
>> + case S2MPS11_BUCK6:
>> + if (!s2mps11->buck6_ramp)
>> + return 0;
>> + case S2MPS11_BUCK1:
>
> nit: Why not have this at the beginning?
>

Nothing special. Instead of putting "case S2MPS11_BUCK6" at beginning,
I preferred to put S2MPS11_BUCK1 here.

>> + ramp_delay = s2mps11->ramp_delay16;
>> + break;
>> + case S2MPS11_BUCK7:
>> + case S2MPS11_BUCK8:
>> + case S2MPS11_BUCK10:
>> + ramp_delay = s2mps11->ramp_delay7810;
>> + break;
>> + case S2MPS11_BUCK9:
>> + ramp_delay = s2mps11->ramp_delay9;
>> + }
>
> How about adding a break statement above?
>

hmm .. I can't see any worth of it.
Is it required according to linux coding convention ?


Regards,
Yadwinder

--
> With warm regards,
> Sachin


\
 
 \ /
  Last update: 2013-07-03 15:01    [W:0.134 / U:1.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site