From patchwork Fri Jul 3 00:16:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 490854 X-Patchwork-Delegate: sjg@chromium.org 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 341A81402A9 for ; Fri, 3 Jul 2015 10:20:51 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b=J76o7bcm; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9E3AA4B7A9; Fri, 3 Jul 2015 02:20:36 +0200 (CEST) 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 DQAkIxbsGRm7; Fri, 3 Jul 2015 02:20:36 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 032DF4B6F3; Fri, 3 Jul 2015 02:19:18 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3B9074B693 for ; Fri, 3 Jul 2015 02:17:10 +0200 (CEST) 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 gZHKXnavmi7m for ; Fri, 3 Jul 2015 02:17:10 +0200 (CEST) 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 mail-ie0-f172.google.com (mail-ie0-f172.google.com [209.85.223.172]) by theia.denx.de (Postfix) with ESMTPS id 8DA424B6A1 for ; Fri, 3 Jul 2015 02:17:03 +0200 (CEST) Received: by ieqy10 with SMTP id y10so67670468ieq.0 for ; Thu, 02 Jul 2015 17:17:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=TIn6eXOiliU26MQ6yhCC7ico8EqDgyzoI7vvxi13GsY=; b=J76o7bcmw1krlG3xKLvxnbye7pWQDtz96pz3ZfzcRzrY57KQxTh2kpS2GW/F+L8vro XctIs2riq3TkGWgDWRV+K0rUk7WD00VaAeOIR9RSg4ZzC5LJi/PA2sQcXtiwjiSIvYq+ DK4oObRpR8ilm7V7Y00R4SsMxSYJ3eBAQpsjolkoYU/8xckqPplryHmqQUvsztAoXo2e 1LKTb8Qx2K6diGHsHunW1nh4AYwas/1DrVEXAZqgkPPHSAfOx7NkR/muIC3Nljwix/7l 8QS2TaQ7tMJwbUKu0EmldSHf3fx42KtCR9n8o+SI5t49wp4f8dcNkyIX13xsrgtLB4G4 +Dbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=TIn6eXOiliU26MQ6yhCC7ico8EqDgyzoI7vvxi13GsY=; b=d+jJKRSU+N7BMr3BK5dE9GQLsTUj5pQjyzwuFI5tnvkPwCAGybCvWqmMl7BephfzTl +GCEd+LQqI2Pn+F76mXeEE5qKOhdRafUtkKtDOzLT+2LD2qVHAHjO2f4iRDQ1YoxLO59 LTGJP9mYbpPc+mMN8yE6My2K42iCuvowWRUSCFVNsdmAE8Co5qf1tzffsIUajetiGCat 8wgyGhmiMjTa+4DUaH/DLo4pJpNvxB9mHtLrdeDE4UCEw6AZ/9l+TRL/51ElsyuCSJSy wzbnQBE0O1miIUCxCwrUNBwu7ghx5vvvr88n1vy9y8YlmcdySTF4m1J2w/JVgp4nX3N+ TgDQ== X-Gm-Message-State: ALoCoQnzf9+ggEv0o+sfDHCJse+ViCvIAyrUZ6a4wYIfVk997BVqWqO/16T/LViuiAyDra2iqpqF X-Received: by 10.42.238.14 with SMTP id kq14mr14913060icb.23.1435882622070; Thu, 02 Jul 2015 17:17:02 -0700 (PDT) Received: from kaki.bld.corp.google.com ([172.29.216.32]) by mx.google.com with ESMTPSA id 137sm5059238ioo.29.2015.07.02.17.16.59 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Jul 2015 17:17:01 -0700 (PDT) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 96C1F22119E; Thu, 2 Jul 2015 18:16:54 -0600 (MDT) From: Simon Glass To: U-Boot Mailing List Date: Thu, 2 Jul 2015 18:16:05 -0600 Message-Id: <1435882592-487-29-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.4.3.573.g4eafbef In-Reply-To: <1435882592-487-1-git-send-email-sjg@chromium.org> References: <1435882592-487-1-git-send-email-sjg@chromium.org> Cc: Przemyslaw Marczak , Tom Rini Subject: [U-Boot] [PATCH 28/55] dm: pmic: max77686: Support all BUCK regulators 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add support for all BUCK regulators, now that the correct register is accessed for each. Signed-off-by: Simon Glass --- drivers/power/regulator/max77686.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/power/regulator/max77686.c b/drivers/power/regulator/max77686.c index 21173fc..427b717 100644 --- a/drivers/power/regulator/max77686.c +++ b/drivers/power/regulator/max77686.c @@ -81,11 +81,7 @@ static int max77686_buck_volt2hex(int buck, int uV) /* hex = (uV - 600000) / 12500; */ hex = (uV - MAX77686_BUCK_UV_LMIN) / MAX77686_BUCK_UV_LSTEP; hex_max = MAX77686_BUCK234_VOLT_MAX_HEX; - /** - * Those use voltage scaller - temporary not implemented - * so return just 0 - */ - return -ENOSYS; + break; default: /* hex = (uV - 750000) / 50000; */ hex = (uV - MAX77686_BUCK_UV_HMIN) / MAX77686_BUCK_UV_HSTEP; @@ -379,11 +375,11 @@ static int max77686_buck_val(struct udevice *dev, int op, int *uV) case 2: case 3: case 4: - /* Those use voltage scallers - will support in the future */ mask = MAX77686_BUCK234_VOLT_MASK; - return -ENOSYS; + break; default: mask = MAX77686_BUCK_VOLT_MASK; + break; } ret = pmic_read(dev->parent, adr, &val, 1);