From patchwork Fri Oct 21 10:38:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lokesh Vutla X-Patchwork-Id: 9388657 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 ECFBF607D0 for ; Fri, 21 Oct 2016 10:40:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE9AD29FF3 for ; Fri, 21 Oct 2016 10:40:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D35C229FF7; Fri, 21 Oct 2016 10:40:11 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4FB0E29FF3 for ; Fri, 21 Oct 2016 10:40:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755165AbcJUKkJ (ORCPT ); Fri, 21 Oct 2016 06:40:09 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:51992 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755155AbcJUKkH (ORCPT ); Fri, 21 Oct 2016 06:40:07 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id u9LAdcnd003843; Fri, 21 Oct 2016 05:39:38 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id u9LAdclt027495; Fri, 21 Oct 2016 05:39:38 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.294.0; Fri, 21 Oct 2016 05:39:37 -0500 Received: from a0131933.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id u9LAdL5d009291; Fri, 21 Oct 2016 05:39:34 -0500 From: Lokesh Vutla To: Tony Lindgren , Linux OMAP Mailing List CC: Tero Kristo , Sekhar Nori , Nishanth Menon , Device Tree Mailing List , Rob Herring , Linux ARM Mailing List , Lokesh Vutla , Lee Jones , Keerthy Subject: [PATCH v2 4/9] regulator: lp873x: Add support for populating input supply Date: Fri, 21 Oct 2016 16:08:36 +0530 Message-ID: <20161021103841.8044-5-lokeshvutla@ti.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161021103841.8044-1-lokeshvutla@ti.com> References: <20161021103841.8044-1-lokeshvutla@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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..998837a 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-in-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"),\