On Wed, Jul 3, 2013 at 5:23 PM, Sachin Kamat <[email protected]> wrote:
>> +static void s2mps11_pmic_set_buck_ramp(struct regulator_init_data 
>> *init_data,
>> +                                       struct s2mps11_info *s2mps11, int id)
>> +{
>> +       unsigned int ramp_rate;
>> +
>> +       if (!init_data)
>> +               return;
>> +
>> +       ramp_rate = init_data->constraints.ramp_delay;
>> +
>> +       switch (id) {
>> +       case S2MPS11_BUCK2:
>> +               s2mps11->ramp_delay2 = ramp_rate;
>> +               break;
>> +       case S2MPS11_BUCK3:
>> +       case S2MPS11_BUCK4:
>> +               if (ramp_rate > s2mps11->ramp_delay34)
>> +                       s2mps11->ramp_delay34 = ramp_rate;
>> +               break;
>> +       case S2MPS11_BUCK5:
>> +               s2mps11->ramp_delay5 = ramp_rate;
>> +               break;
>> +       case S2MPS11_BUCK1:
>> +       case S2MPS11_BUCK6:
>> +               if (ramp_rate > s2mps11->ramp_delay16)
>> +                       s2mps11->ramp_delay16 = ramp_rate;
>> +               break;
>> +       case S2MPS11_BUCK7:
>> +       case S2MPS11_BUCK8:
>> +       case S2MPS11_BUCK10:
>> +               if (ramp_rate > s2mps11->ramp_delay7810)
>> +                       s2mps11->ramp_delay7810 = ramp_rate;
>> +               break;
>> +       case S2MPS11_BUCK9:
>> +               s2mps11->ramp_delay9 = ramp_rate;
>
> How about adding a 'break' here for completeness.
>
> [snip]
>
>>  static int s2mps11_pmic_probe(struct platform_device *pdev)
>>  {
>>         struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
>>         struct sec_platform_data *pdata = dev_get_platdata(iodev->dev);
>> +       struct of_regulator_match rdata[S2MPS11_REGULATOR_MAX];
>> +       struct device_node *reg_np = NULL;
>>         struct regulator_config config = { };
>>         struct s2mps11_info *s2mps11;
>> -       int i, ret;
>> +       int i, id, ret;
>>         unsigned char ramp_enable, ramp_reg = 0;
>>
>> -       if (!pdata) {
>> -               dev_err(pdev->dev.parent, "Platform data not supplied\n");
>> -               return -ENODEV;
>> -       }
>> -
>>         s2mps11 = devm_kzalloc(&pdev->dev, sizeof(struct s2mps11_info),
>
> sizeof(*s2mps11) is preferred.
>

Will fix this and spellings in documentation in next version after
waiting some time for review comments from others also.


Regards,
Yadwinder

> --
> With warm regards,
> Sachin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to