From patchwork Sat Feb 9 22:54:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 1039306 X-Patchwork-Delegate: promsoft@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="ylkX9l/Y"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 43xnVs27Vwz9s5c for ; Sun, 10 Feb 2019 09:57:09 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 01F0FC22051; Sat, 9 Feb 2019 22:55:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=KHOP_BIG_TO_CC, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id A988DC22055; Sat, 9 Feb 2019 22:55:15 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 1731EC21FF3; Sat, 9 Feb 2019 22:54:44 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by lists.denx.de (Postfix) with ESMTPS id D097BC2201B for ; Sat, 9 Feb 2019 22:54:39 +0000 (UTC) Received: from localhost.localdomain (unknown [194.230.155.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8CC1B218D2; Sat, 9 Feb 2019 22:54:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549752878; bh=KX7+SppqBVHXusb/vv0PfgBGwP9hoDjCj+8NIsq1GLQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ylkX9l/YVbRkii42kEUL1LOiwKiLHPkFrit+PNo0Zyv9eLPpUTkpA+jZOw3kZNK0L kfcWu3Fd1/Ihel5FP/7yiJi8kFg5B4+hLTD44VpGl9U2u4MdL8Bc32PUI+J6KPqMXI s/NSmUuK5uNUEAe6sy1dJzqJfEehMVeP34jvAwRI= From: Krzysztof Kozlowski To: Albert Aribaud , Jaehoon Chung , Krzysztof Kozlowski , Simon Glass , Minkyu Kang , Marek Szyprowski , Lukasz Majewski , Dirk Meul , Patrice Chotard , Felix Brack , Jack Mitchell , Patrick Delaunay , Lokesh Vutla , u-boot@lists.denx.de Date: Sat, 9 Feb 2019 23:54:08 +0100 Message-Id: <20190209225411.32756-6-krzk@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190209225411.32756-1-krzk@kernel.org> References: <20190209225411.32756-1-krzk@kernel.org> Subject: [U-Boot] [RFT 5/8] power: regulator: s2mps11: Fix step for LDO27 and LDO35 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" LDO27 and LDO35 have 25 mV step, not 50 mV. Signed-off-by: Krzysztof Kozlowski --- drivers/power/regulator/s2mps11_regulator.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/power/regulator/s2mps11_regulator.c b/drivers/power/regulator/s2mps11_regulator.c index ced504eb1476..723d27f67c9a 100644 --- a/drivers/power/regulator/s2mps11_regulator.c +++ b/drivers/power/regulator/s2mps11_regulator.c @@ -346,6 +346,8 @@ static int s2mps11_ldo_hex2volt(int ldo, int hex) case 11: case 22: case 23: + case 27: + case 35: uV = hex * S2MPS11_LDO_STEP + S2MPS11_LDO_UV_MIN; break; default: @@ -366,6 +368,8 @@ static int s2mps11_ldo_volt2hex(int ldo, int uV) case 11: case 22: case 23: + case 27: + case 35: hex = (uV - S2MPS11_LDO_UV_MIN) / S2MPS11_LDO_STEP; break; default: