From patchwork Mon Feb 4 11:54:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 14504 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 4F1A423F96 for ; Mon, 4 Feb 2013 11:57:39 +0000 (UTC) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by fiordland.canonical.com (Postfix) with ESMTP id ECC2CA1877A for ; Mon, 4 Feb 2013 11:57:38 +0000 (UTC) Received: by mail-ve0-f171.google.com with SMTP id b10so4568304vea.16 for ; Mon, 04 Feb 2013 03:57:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=2scTuHjA7gz/oGfOshdOcS7+snLgpQqRrzfaLWAZAQM=; b=W16s1c3XwO2GM4f45ybX5pOSE0SMw68odKzW8/fILlFuhJjFspIyFfOpNE2LMFpTgX OPOo2/jH9OFUO6pYv5tnWmOtVmIBzorYFcYhNfQEvJbDiqYpBM4VdBCNFn0bi0Bc/QQ7 Jknd1lPOeDEoen3EcvE4+7nWvsQvaAESftEkvc72UmZHgRSMECEd/foXsyPnOA6kRO9V KavFs4H8wsb+XJJkj3TyzLZ9+PFrQwq9ek9L6BoOYQHae+jvU/h4dMHLwNig0OQgRFGK tBLpns1lWzsbaG5XGqRr6j49Dcjujy205w7XJUiF+NlouMP28Lphhhs1wvdUN4kLQEvo xnpA== X-Received: by 10.52.27.50 with SMTP id q18mr19335213vdg.20.1359979058481; Mon, 04 Feb 2013 03:57:38 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.252.8 with SMTP id zo8csp83116vec; Mon, 4 Feb 2013 03:57:35 -0800 (PST) X-Received: by 10.180.8.4 with SMTP id n4mr9843498wia.13.1359979054998; Mon, 04 Feb 2013 03:57:34 -0800 (PST) Received: from mail-wg0-f46.google.com (mail-wg0-f46.google.com [74.125.82.46]) by mx.google.com with ESMTPS id q17si3467787wie.114.2013.02.04.03.57.34 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 04 Feb 2013 03:57:34 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.46 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.46; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.46 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-wg0-f46.google.com with SMTP id fg15so4529528wgb.1 for ; Mon, 04 Feb 2013 03:57:34 -0800 (PST) X-Received: by 10.180.73.80 with SMTP id j16mr9931705wiv.5.1359979054550; Mon, 04 Feb 2013 03:57:34 -0800 (PST) Received: from localhost.localdomain (cpc34-aztw25-2-0-cust250.18-1.cable.virginmedia.com. [86.16.136.251]) by mx.google.com with ESMTPS id j9sm12937128wia.5.2013.02.04.03.57.32 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 04 Feb 2013 03:57:33 -0800 (PST) From: Lee Jones To: linux-kernel@vger.kernel.org, broonie@opensource.wolfsonmicro.com Cc: Mattias Wallin , Lee Jones Subject: [PATCH 55/73] regulator: ab8500: Provide ExtSupply register init values for AB8505 Date: Mon, 4 Feb 2013 11:54:10 +0000 Message-Id: <1359978868-28736-56-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1359978868-28736-1-git-send-email-lee.jones@linaro.org> References: <1359978868-28736-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQmJwrCtw5osUBC3/+Od5z2HTNy+yJ3tg7p58MAQ+0HNMwTZeZqtIFAzRD2SvYWp8if/6FX6 From: Mattias Wallin On the AB8505 chip the ExtSupply balls are not mounted. However the ExtSupply register is there and this patch set the correct init value for that register. On HREF520 it saves 300uA. Signed-off-by: Mattias Wallin Signed-off-by: Lee Jones Reviewed-by: Marcus COOPER Reviewed-by: Rabin VINCENT --- arch/arm/mach-ux500/board-mop500-regulators.c | 8 ++++++++ drivers/regulator/ab8500.c | 8 ++++++++ include/linux/regulator/ab8500.h | 1 + 3 files changed, 17 insertions(+) diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c index 6c232b7..cc6ec35 100644 --- a/arch/arm/mach-ux500/board-mop500-regulators.c +++ b/arch/arm/mach-ux500/board-mop500-regulators.c @@ -651,6 +651,14 @@ static struct ab8500_regulator_reg_init ab8505_reg_init[] = { */ INIT_REGULATOR_REGISTER(AB8505_VPLLVANAREGU, 0x0f, 0x02), /* + * VextSupply1Regu = force OFF (OTP_ExtSupply12LPnPolarity 1) + * VextSupply2Regu = force OFF (OTP_ExtSupply12LPnPolarity 1) + * VextSupply3Regu = force OFF (OTP_ExtSupply3LPnPolarity 0) + * ExtSupply2Bypass = ExtSupply12LPn ball is 0 when Ena is 0 + * ExtSupply3Bypass = ExtSupply3LPn ball is 0 when Ena is 0 + */ + INIT_REGULATOR_REGISTER(AB8505_EXTSUPPLYREGU, 0xff, 0x30), + /* * Vaux1Regu = force HP * Vaux2Regu = force off */ diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c index f78cad5..e654f0a 100644 --- a/drivers/regulator/ab8500.c +++ b/drivers/regulator/ab8500.c @@ -1803,6 +1803,14 @@ static struct ab8500_reg_init ab8505_reg_init[] = { */ REG_INIT(AB8505_VPLLVANAREGU, 0x04, 0x06, 0x0f), /* + * 0x03, VextSupply1Regu + * 0x0c, VextSupply2Regu + * 0x30, VextSupply3Regu + * 0x40, ExtSupply2Bypass + * 0x80, ExtSupply3Bypass + */ + REG_INIT(AB8505_EXTSUPPLYREGU, 0x04, 0x08, 0xff), + /* * 0x03, Vaux1Regu * 0x0c, Vaux2Regu */ diff --git a/include/linux/regulator/ab8500.h b/include/linux/regulator/ab8500.h index 1d33586..5977c47 100644 --- a/include/linux/regulator/ab8500.h +++ b/include/linux/regulator/ab8500.h @@ -158,6 +158,7 @@ enum ab8505_regulator_reg { AB8505_VSMPSBREGU, AB8505_VSAFEREGU, /* NOTE! PRCMU register */ AB8505_VPLLVANAREGU, + AB8505_EXTSUPPLYREGU, AB8505_VAUX12REGU, AB8505_VRF1VAUX3REGU, AB8505_VSMPSASEL1,