From patchwork Fri Sep 26 05:59:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Harvey X-Patchwork-Id: 4978701 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 68B609F3DF for ; Fri, 26 Sep 2014 06:02:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8F1BF202AE for ; Fri, 26 Sep 2014 06:02:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B521620274 for ; Fri, 26 Sep 2014 06:02:33 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XXOa4-0004PB-G5; Fri, 26 Sep 2014 06:00:36 +0000 Received: from mail-pd0-f181.google.com ([209.85.192.181]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XXOZh-000326-PO for linux-arm-kernel@lists.infradead.org; Fri, 26 Sep 2014 06:00:14 +0000 Received: by mail-pd0-f181.google.com with SMTP id r10so12281479pdi.40 for ; Thu, 25 Sep 2014 22:59:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=eUTwQ800rGTqWTuurJ7n0OivM/FOloCR3k1/3dsXVcs=; b=P2V5zWFtbNX4mo/mCY+8PDpfVjdQxCG9tE3yGs13JvvbjMYFPPRbVEmF0BdN0XY8+V NHKzy6VPDvC8GSaR9ARrd/VxchuhlphCWaXJ8eFMxBMxwT9feCpxh0VWFA+VrqFo9fB1 5AQQqT/reen3z+zOtNTX0F7Ia6RUzIaFRMYM2OWkTi7T6KhEgna9e7IPok6Gzuef0Tsv PwVFuLdTxcCfcIVI4enhYOHn/GWpYYEtmCLI2RLQPbOy9+uZSkjTtS4kgTm0jEeTiDfe zmN7B/wyEXVfO9QVC2WnjcWxVNqrzLDJcR2hUBg6jOKQYs3Du6e465at+dL2Ie/S07Yx wWxw== X-Gm-Message-State: ALoCoQkPcLUxgBMhWgqmqJuSziIzzejZ8jddXek7tGYBoXBGo0Ob1pYr4QwOslGGKtQAieB5O88r X-Received: by 10.70.65.34 with SMTP id u2mr37498691pds.58.1411711191708; Thu, 25 Sep 2014 22:59:51 -0700 (PDT) Received: from tharvey-gw.gw (68-189-91-139.static.snlo.ca.charter.com. [68.189.91.139]) by mx.google.com with ESMTPSA id ty8sm3855735pab.26.2014.09.25.22.59.50 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 25 Sep 2014 22:59:51 -0700 (PDT) From: Tim Harvey To: Shawn Guo Subject: [PATCH 1/2] regulator: anatop: allow LDO bypass to be set from device-tree Date: Thu, 25 Sep 2014 22:59:31 -0700 Message-Id: <1411711172-16498-2-git-send-email-tharvey@gateworks.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1411711172-16498-1-git-send-email-tharvey@gateworks.com> References: <1411711172-16498-1-git-send-email-tharvey@gateworks.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140925_230013_851434_40A9EC50 X-CRM114-Status: GOOD ( 11.54 ) X-Spam-Score: -1.0 (-) Cc: Mark Brown , Silvio F , Philipp Zabel , Christian Hemp , Russell King , Iain Paton , Fabio Estevam , linux-arm-kernel@lists.infradead.org, Lucas Stach X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The core regulators provided by the Anatop regulator (reg_core, reg_soc, reg_pu) should be set in bypass mode if an extern PMIC regulator is used. This allows configuring this from device-tree. Cc: Philipp Zabel Cc: Fabio Estevam Cc: Mark Brown Signed-off-by: Tim Harvey --- Documentation/devicetree/bindings/regulator/anatop-regulator.txt | 1 + drivers/regulator/anatop-regulator.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/regulator/anatop-regulator.txt b/Documentation/devicetree/bindings/regulator/anatop-regulator.txt index 758eae2..e958c60 100644 --- a/Documentation/devicetree/bindings/regulator/anatop-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/anatop-regulator.txt @@ -13,6 +13,7 @@ Optional properties: - anatop-delay-reg-offset: Anatop MFD step time register offset - anatop-delay-bit-shift: Bit shift for the step time register - anatop-delay-bit-width: Number of bits used in the step time register +- anatop-ldo-bypass: Enable LDO bypass mode (for core regulators) Any property defined as part of the core regulator binding, defined in regulator.txt, can also be used. diff --git a/drivers/regulator/anatop-regulator.c b/drivers/regulator/anatop-regulator.c index 4f730af..0a22d3a 100644 --- a/drivers/regulator/anatop-regulator.c +++ b/drivers/regulator/anatop-regulator.c @@ -279,8 +279,10 @@ static int anatop_regulator_probe(struct platform_device *pdev) } sreg->sel = (val & rdesc->vsel_mask) >> sreg->vol_bit_shift; - if (sreg->sel == LDO_FET_FULL_ON) { + if (sreg->sel == LDO_FET_FULL_ON || + of_property_read_bool(np, "anatop-ldo-bypass")) { sreg->sel = 0; + dev_info(dev, "LDO bypass mode\n"); sreg->bypass = true; } } else {