From patchwork Fri Feb 3 11:34:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keerthy X-Patchwork-Id: 723582 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3vFFCh6Fghz9s75 for ; Fri, 3 Feb 2017 22:35:12 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8CB6C4AE45; Fri, 3 Feb 2017 12:35:10 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8PFxcjZsxvPM; Fri, 3 Feb 2017 12:35:10 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id ED94DA76CE; Fri, 3 Feb 2017 12:35:09 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A95154AE45 for ; Fri, 3 Feb 2017 12:35:04 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id auvTjE7qMpZF for ; Fri, 3 Feb 2017 12:35:04 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from fllnx209.ext.ti.com (fllnx209.ext.ti.com [198.47.19.16]) by theia.denx.de (Postfix) with ESMTPS id 2BFF94ADB1 for ; Fri, 3 Feb 2017 12:34:59 +0100 (CET) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id v13BYHv1012377; Fri, 3 Feb 2017 05:34:17 -0600 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v13BYBbN031968; Fri, 3 Feb 2017 05:34:11 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.294.0; Fri, 3 Feb 2017 05:34:11 -0600 Received: from ula0393675.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v13BY9NY017634; Fri, 3 Feb 2017 05:34:09 -0600 From: Keerthy To: , Date: Fri, 3 Feb 2017 17:04:08 +0530 Message-ID: <1486121648-29532-1-git-send-email-j-keerthy@ti.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Cc: u-boot@lists.denx.de, t-kristo@ti.com Subject: [U-Boot] [PATCH v2] regulator: palmas: Fix smps6 - smps9 indices X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The array indices used currently are dispalaced by 1 for SMPS6 through SMPS10 in the respective places of voltage and ctrl arrays hence fix the same as to assign the right voltage and ctrl registers. Signed-off-by: Keerthy --- Changes in v2: * Elaborated the commit log. drivers/power/regulator/palmas_regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/regulator/palmas_regulator.c b/drivers/power/regulator/palmas_regulator.c index cce7cd2..399f7a5 100644 --- a/drivers/power/regulator/palmas_regulator.c +++ b/drivers/power/regulator/palmas_regulator.c @@ -356,7 +356,7 @@ static int palmas_smps_probe(struct udevice *dev) case 8: case 9: case 10: - idx = dev->driver_data - 4; + idx = dev->driver_data - 3; uc_pdata->ctrl_reg = palmas_smps_ctrl[type][idx]; uc_pdata->volt_reg = palmas_smps_volt[type][idx]; break;