From patchwork Fri Oct 14 13:00:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lokesh Vutla X-Patchwork-Id: 9376771 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BB6696075E for ; Fri, 14 Oct 2016 13:04:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC54C2A67B for ; Fri, 14 Oct 2016 13:04:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A106B2A689; Fri, 14 Oct 2016 13:04:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 84D172A67B for ; Fri, 14 Oct 2016 13:04:32 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bv28Y-0003f9-Ua; Fri, 14 Oct 2016 13:02:58 +0000 Received: from devils.ext.ti.com ([198.47.26.153]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bv27R-00025V-NP for linux-arm-kernel@lists.infradead.org; Fri, 14 Oct 2016 13:01:51 +0000 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id u9ED1QhN019618; Fri, 14 Oct 2016 08:01:26 -0500 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 u9ED1QS0028734; Fri, 14 Oct 2016 08:01:26 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.294.0; Fri, 14 Oct 2016 08:01:25 -0500 Received: from a0131933.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id u9ED191k000837; Fri, 14 Oct 2016 08:01:22 -0500 From: Lokesh Vutla To: Tony Lindgren , Linux OMAP Mailing List Subject: [PATCH 4/9] regulator: lp873x: Add support for populating input supply Date: Fri, 14 Oct 2016 18:30:28 +0530 Message-ID: <20161014130033.14172-5-lokeshvutla@ti.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20161014130033.14172-1-lokeshvutla@ti.com> References: <20161014130033.14172-1-lokeshvutla@ti.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161014_060149_922976_B285E6B1 X-CRM114-Status: UNSURE ( 8.69 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nishanth Menon , devicetree@vger.kernel.org, Lokesh Vutla , Keerthy , Sekhar Nori , Tero Kristo , Rob Herring , Lee Jones , Linux ARM Mailing List Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP In order to have a proper topology of regulators for a platform, each registering regulator needs to populate supply_name field for identifying its supply's name. Add supply_name field for lp873x regulators. Cc: Lee Jones Cc: Keerthy Signed-off-by: Lokesh Vutla --- Documentation/devicetree/bindings/mfd/lp873x.txt | 8 ++++++++ drivers/regulator/lp873x-regulator.c | 1 + 2 files changed, 9 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/lp873x.txt b/Documentation/devicetree/bindings/mfd/lp873x.txt index 52766c2..936cba3 100644 --- a/Documentation/devicetree/bindings/mfd/lp873x.txt +++ b/Documentation/devicetree/bindings/mfd/lp873x.txt @@ -7,6 +7,9 @@ Required properties: - #gpio-cells: Should be two. The first cell is the pin number and the second cell is used to specify flags. See ../gpio/gpio.txt for more information. + - xxx-supply: Phandle to parent supply node of each regulator + populated under regulators node. xxx should match + the supply_name populated in driver. - regulators: List of child nodes that specify the regulator initialization data. Example: @@ -17,6 +20,11 @@ pmic: lp8733@60 { gpio-controller; #gpio-cells = <2>; + buck0-in-supply = <&vsys_3v3>; + buck1-in-supply = <&vsys_3v3>; + ldo0-in-supply = <&vsys_3v3>; + ldo1-in-supply = <&vsys_3v3>; + regulators { lp8733_buck0: buck0 { regulator-name = "lp8733-buck0"; diff --git a/drivers/regulator/lp873x-regulator.c b/drivers/regulator/lp873x-regulator.c index e504b91..70e3df6 100644 --- a/drivers/regulator/lp873x-regulator.c +++ b/drivers/regulator/lp873x-regulator.c @@ -24,6 +24,7 @@ [_id] = { \ .desc = { \ .name = _name, \ + .supply_name = _of "-in", \ .id = _id, \ .of_match = of_match_ptr(_of), \ .regulators_node = of_match_ptr("regulators"),\