From patchwork Wed Nov 2 05:28:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lokesh Vutla X-Patchwork-Id: 9408545 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 2D5B160721 for ; Wed, 2 Nov 2016 05:30:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B83729E1C for ; Wed, 2 Nov 2016 05:30:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C24929E1F; Wed, 2 Nov 2016 05:30:03 +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 4A82029E1C for ; Wed, 2 Nov 2016 05:30:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753572AbcKBFaA (ORCPT ); Wed, 2 Nov 2016 01:30:00 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:47514 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751845AbcKBF37 (ORCPT ); Wed, 2 Nov 2016 01:29:59 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id uA25TUqN018661; Wed, 2 Nov 2016 00:29:30 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id uA25TUsC011304; Wed, 2 Nov 2016 00:29:30 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.294.0; Wed, 2 Nov 2016 00:29:29 -0500 Received: from [172.24.190.6] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id uA25TPbe030081; Wed, 2 Nov 2016 00:29:26 -0500 Subject: Re: [PATCH v2 4/9] regulator: lp873x: Add support for populating input supply To: Rob Herring References: <20161021103841.8044-1-lokeshvutla@ti.com> <20161021103841.8044-5-lokeshvutla@ti.com> <20161030204118.ojeetnxl5qsi6lp7@rob-hp-laptop> CC: Tony Lindgren , Linux OMAP Mailing List , Tero Kristo , Sekhar Nori , Nishanth Menon , Device Tree Mailing List , Linux ARM Mailing List , Lee Jones , Keerthy From: Lokesh Vutla Message-ID: Date: Wed, 2 Nov 2016 10:58:40 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20161030204118.ojeetnxl5qsi6lp7@rob-hp-laptop> 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 On Monday 31 October 2016 02:11 AM, Rob Herring wrote: > On Fri, Oct 21, 2016 at 04:08:36PM +0530, Lokesh Vutla wrote: >> 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. > > The driver is irrelevant. This should reference a list in this document. okay. See if the below updated patch is fine. -----------------------------8<----------------------------8<---------------------------- From 666f925423fa35c7bfcc77fa3c883cbea5d8ef8e Mon Sep 17 00:00:00 2001 From: Lokesh Vutla Date: Wed, 21 Sep 2016 11:50:49 +0530 Subject: [PATCH v3] regulator: lp873x: Add support for populating input supply 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. Signed-off-by: Lokesh Vutla Acked-by: Rob Herring --- 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..ae9cf39 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 can be + buck0, buck1, ldo0 or ldo1. - 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"),\