From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161009AbcFCMfV (ORCPT ); Fri, 3 Jun 2016 08:35:21 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:50117 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932526AbcFCMfQ (ORCPT ); Fri, 3 Jun 2016 08:35:16 -0400 X-AuditID: cbfec7f5-f792a6d000001302-0c-5751797ef1d6 Subject: Re: [PATCH v3 06/12] power: pwrseq: simple: Add support for regulator and generic property To: Rob Herring References: <1464768141-25420-1-git-send-email-k.kozlowski@samsung.com> <1464768141-25420-7-git-send-email-k.kozlowski@samsung.com> <20160603020218.GA19436@rob-hp-laptop> Cc: hzpeterchen@gmail.com, Ulf Hansson , Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , Javier Martinez Canillas , linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-pm@vger.kernel.or, Alan Stern , linux-usb@vger.kernel.org, Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Kukjin Kim , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Greg Kroah-Hartman , Bartlomiej Zolnierkiewicz From: Krzysztof Kozlowski Message-id: <5751797C.3020607@samsung.com> Date: Fri, 03 Jun 2016 14:35:08 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-version: 1.0 In-reply-to: <20160603020218.GA19436@rob-hp-laptop> Content-type: text/plain; charset=windows-1252 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrMIsWRmVeSWpSXmKPExsVy+t/xK7p1lYHhBhf3clpsnLGe1WLSk/fM FvOPnGO1mLhyMrNF/5uFrBbNi9ezWXRd3cRmce7VSkaLN2/XMFm8fmFo0f/4NbPFpsfXWC0u 75rDZnHkfz+jxcyLq1ksZpzfx2SxaFkrs8XS6xeZLCZMX8ti8X/PDnaL07tLLCb8vsBmcXxt uIO4x5p5axg9Lvf1MnnsnHWX3WPl8i9sHptXaHlsWtXJ5nHn2h42j/1z17B7bF5S77GlH6hg 9t0fjB59W1Yxehz5Op3F4/MmuQC+KC6blNSczLLUIn27BK6Mjn+3mQsuiFV8arjO3MC4SaiL kZNDQsBE4s+qC6wQtpjEhXvr2boYuTiEBJYySjxZ9pYVwnnGKLH3400WkCphgVSJnqm9TCC2 iICixO+2aVBF6xglzs7cCOYwCyxgk7h16AEjSBWbgLHE5uVL2EBsXgEtiZPP+phBbBYBVYkJ t06ATRUViJCYtf0HE0SNoMSPyfeA4hwcnEC9B85xg5jMAnoS9y9qgVQwC8hLbF7zlnkCo8As JA2zEKpmIalawMi8ilE0tTS5oDgpPddIrzgxt7g0L10vOT93EyMkqr/uYFx6zOoQowAHoxIP L8PigHAh1sSy4srcQ4wSHMxKIrx/CgLDhXhTEiurUovy44tKc1KLDzFKc7AoifPO3PU+REgg PbEkNTs1tSC1CCbLxMEp1cBo45IlzrHUZekC6Y+Gf902L125Rqt9S0Dp/27tZUn/r36evaps St0lHR/Wi2fra2dzbVmjOMOAwz7Bx8bY8YPlc7mn8io/1n6yZTw4M+XIT2ajQNHDGz63qiSf UrYSvXL4xIR7tdFc8sKPZ3d23bLfdtNSyOlfInvM6bb6jNPnpF1EKycqlqkpsRRnJBpqMRcV JwIAcXWUbuYCAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/03/2016 04:02 AM, Rob Herring wrote: > On Wed, Jun 01, 2016 at 10:02:15AM +0200, Krzysztof Kozlowski wrote: >> Some devices need real hard-reset by cutting the power. During power >> sequence turn off and on the regulator, if it is provided. >> >> Additionally add support for instantiating the pwrseq-simple device on a >> generic property 'power-sequence'. The device will attach itself to the >> node containing the property and parse the node's properties like >> reset-gpios, ext-supply etc. >> >> Signed-off-by: Krzysztof Kozlowski >> --- >> .../bindings/power/pwrseq/pwrseq-simple.txt | 29 +++++++- >> drivers/power/pwrseq/pwrseq_simple.c | 85 +++++++++++++++++++++- >> 2 files changed, 107 insertions(+), 7 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/power/pwrseq/pwrseq-simple.txt b/Documentation/devicetree/bindings/power/pwrseq/pwrseq-simple.txt >> index ce0e76749671..a8c3f13ee83f 100644 >> --- a/Documentation/devicetree/bindings/power/pwrseq/pwrseq-simple.txt >> +++ b/Documentation/devicetree/bindings/power/pwrseq/pwrseq-simple.txt >> @@ -1,11 +1,17 @@ >> -* The simple MMC power sequence provider >> +* The simple power sequence provider >> >> -The purpose of the simple MMC power sequence provider is to supports a set of >> +The purpose of the simple power sequence provider is to supports a set of >> common properties between various SOC designs. It thus enables us to use the >> same provider for several SOC designs. >> >> -Required properties: >> -- compatible : contains "mmc-pwrseq-simple". >> +The driver supports two types of bindings: >> +1. Separate node >> + Required properties: >> + - compatible : contains "mmc-pwrseq-simple". > > Please note that this is not recommended for new users. Sure. > >> + >> +2. Property for any node >> + Required properties: >> + - power-sequence >> >> Optional properties: >> - reset-gpios : contains a list of GPIO specifiers. The reset GPIOs are asserted >> @@ -16,6 +22,7 @@ Optional properties: >> See ../clocks/clock-bindings.txt for details. >> - clock-names : Must include the following entry: >> "ext_clock" (External clock provided to the card). >> +- ext-supply : External regulator supply > > What happens when there are 2 supplies? > > I'd prefer the name not be genericish and use the real supply names. > Then the power seq code should just turn on all supplies it finds. If > the order or timing to turn on matters, then sorry, no generic sequence. Understood. I'll change the code to use any supply. As for the genericness of this approach, Sylwester Nawrocki pointed an old thread: [PATCH v6 0/4] Runtime Interpreted Power Sequences https://lkml.org/lkml/2012/9/12/127 How do you like that approach? Best regards, Krzysztof