Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932621Ab3GCMpk (ORCPT ); Wed, 3 Jul 2013 08:45:40 -0400 Received: from mail-ie0-f173.google.com ([209.85.223.173]:58167 "EHLO mail-ie0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754646Ab3GCMpj (ORCPT ); Wed, 3 Jul 2013 08:45:39 -0400 MIME-Version: 1.0 In-Reply-To: References: <1372072858-6559-1-git-send-email-yadi.brar@samsung.com> <1372072858-6559-5-git-send-email-yadi.brar@samsung.com> Date: Wed, 3 Jul 2013 18:15:38 +0530 Message-ID: Subject: Re: [PATCH 4/4] regulator: s2mps11: Add device tree support From: Yadwinder Singh Brar To: Sachin Kamat Cc: Yadwinder Singh Brar , linux-kernel@vger.kernel.org, sbkim73@samsung.com, broonie@kernel.org, Liam Girdwood , Samuel Ortiz , rob.herring@calxeda.com, grant.likely@linaro.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2687 Lines: 78 On Wed, Jul 3, 2013 at 5:23 PM, Sachin Kamat 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/