Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1868338ybn; Thu, 26 Sep 2019 03:28:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxQoU6wMlX9L29tCOVhhjVFg5hhJtpj+MS+OA/qhj5pksw55H4wfwmG9tLORyoIqt3p1x4Y X-Received: by 2002:a50:ac0a:: with SMTP id v10mr2696481edc.83.1569493733116; Thu, 26 Sep 2019 03:28:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569493733; cv=none; d=google.com; s=arc-20160816; b=vR2ASTj6KBM+IBIKuYhOkN1TivSL/pTds5CqBy41uYPDhpFQy4MOefc93ETo7s88Ms SloW5TZfC+CkGWgQizMRagEVuCGz3X0PNrQeyD0WqSDslPzat4pKfkUsbP1Os7SB3UM3 p9vzd3/sg71YJLEhMeBBt3rTP+VlWpaEOPUmpfgtLhZGMNzK/NIOjyVlhWd+en8J5y9M Ddjs3a1hGylKSAf78N1sAPxEWPJr7PfP8siARQSLyXPPBojgRQ/FfHvfytPIrdAyz3NO jLPDLIQXMDz7aST5UKAB+1xnURkUkgV9CuhNUmLdor6BsLYSNxT3TCRC2w929AFujL5T kc3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=faIt5hdaEKHX+SuwijyBRvOkEfsmcA9kpP3zeMj6aj4=; b=DGKHWkokYV9q1+u0C974KWm5q/hsiA5huHkiDBS/NFyF5nPIGcAPOE/WXqM+EuxFVj ui53OpQ/NIl07YH3E0S0GC0aUU/u37/faSHDehEue/4tbRngPV5SGbyLa+wSpudqQgHp ZPUuoGO+9Kt2PNCPtZS79AqGzAyn0aWxSRvBogIDW7Zcz6/iB3yGs81Ak+680zNQWopR 9GBkIys1V2wmN4ziceFWgE20ZbfeEubAwPzG/dLIPUSCMUpJaUxBgU3mn3mJQ2I759CV 2PI3rWlacIWSpI6g9ne1F1cmF/GWL1i9hPI4/fJGMs3b3O4Tnamkfi4+bNX9ozfXu5Kd VO1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id kt5si770322ejb.283.2019.09.26.03.28.29; Thu, 26 Sep 2019 03:28:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728772AbfIZIKD (ORCPT + 99 others); Thu, 26 Sep 2019 04:10:03 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:47855 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726473AbfIZIKC (ORCPT ); Thu, 26 Sep 2019 04:10:02 -0400 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iDOqb-0006H7-6Z; Thu, 26 Sep 2019 10:09:57 +0200 Received: from mfe by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1iDOqa-0007Sd-IN; Thu, 26 Sep 2019 10:09:56 +0200 Date: Thu, 26 Sep 2019 10:09:56 +0200 From: Marco Felsch To: Adam Thomson Cc: Support Opensource , "lee.jones@linaro.org" , "robh+dt@kernel.org" , "lgirdwood@gmail.com" , "broonie@kernel.org" , Steve Twiss , "kernel@pengutronix.de" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 2/5] dt-bindings: mfd: da9062: add regulator voltage selection documentation Message-ID: <20190926080956.a3k2z4gf3n6m3n4s@pengutronix.de> References: <20190917124246.11732-1-m.felsch@pengutronix.de> <20190917124246.11732-3-m.felsch@pengutronix.de> <20190925155151.75uaxfiiei3i23tz@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 09:59:38 up 131 days, 14:17, 85 users, load average: 0.07, 0.10, 0.11 User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: mfe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19-09-25 16:18, Adam Thomson wrote: > On 25 September 2019 16:52, Marco Felsch wrote: > > > Hi Adam, > > > > On 19-09-24 09:23, Adam Thomson wrote: > > > On 17 September 2019 13:43, Marco Felsch wrote: > > > > > > > Add the documentation which describe the voltage selection gpio support. > > > > This property can be applied to each subnode within the 'regulators' > > > > node so each regulator can be configured differently. > > > > > > > > Signed-off-by: Marco Felsch > > > > --- > > > > Documentation/devicetree/bindings/mfd/da9062.txt | 9 +++++++++ > > > > 1 file changed, 9 insertions(+) > > > > > > > > diff --git a/Documentation/devicetree/bindings/mfd/da9062.txt > > > > b/Documentation/devicetree/bindings/mfd/da9062.txt > > > > index edca653a5777..9d9820d8177d 100644 > > > > --- a/Documentation/devicetree/bindings/mfd/da9062.txt > > > > +++ b/Documentation/devicetree/bindings/mfd/da9062.txt > > > > @@ -66,6 +66,15 @@ Sub-nodes: > > > > details of individual regulator device can be found in: > > > > Documentation/devicetree/bindings/regulator/regulator.txt > > > > > > > > + Optional regulator device-specific properties: > > > > + - dlg,vsel-sense-gpios : The GPIO reference which should be used by the > > > > + regulator to switch the voltage between active/suspend voltage settings. > > If > > > > + the signal is active the active-settings are applied else the suspend > > > > + settings are applied. Attention: Sharing the same gpio for other purposes > > > > + or across multiple regulators is possible but the gpio settings must be the > > > > + same. Also the gpio phandle must refer to to the dlg,da9062-gpio device > > > > + other gpios are not allowed and make no sense. > > > > + > > > > > > Should we not use the binding names that are defined in 'gpio-regulator.yaml' > > as > > > these seem to be generic and would probably serve the purpose here? > > > > Hm.. as the description says: > > > > 8<-------------------------------------------------- > > gpios: > > description: Array of one or more GPIO pins used to select the > > regulator voltage/current listed in "states". > > 8<-------------------------------------------------- > > > > But we don't have a "states" property and we can't select between > > voltage or current. > > Yes I think I was at cross purposes when I made this remark. The bindings there > describe the GPOs that are used to enable/disable and set voltage/current for > regulators and the supported voltage/current levels that can be configured in > this manner. What you're describing is the GPI for DA9061/2. If you look at > GPIO handling in existing regulator drivers I believe they all deal with external > GPOs that are configured to enable/disable and set voltage/current limits rather > than the GPI on the PMIC itself. That's why I'm thinking that the configurations > you're doing here should actually be in a pinctrl or GPIO driver. That's true, the common gpio bindings are from the view of the processor, e.g. which gpio must the processor drive to enable/switch the regualtor. So one reasone more to use a non-common binding. Please take a look on my other comment I made :) I don't use the gpio-alternative function. I use it as an input. Regards, Marco > I'd be interested in hearing Mark's view on this though as he has far more > experience in this area than I do. > > > > > Regards, > > Marco > > > > > > - rtc : This node defines settings required for the Real-Time Clock associated > > > > with the DA9062. There are currently no entries in this binding, however > > > > compatible = "dlg,da9062-rtc" should be added if a node is created. > > > > -- > > > > 2.20.1 > > > > > > > > > > -- > > Pengutronix e.K. | | > > Industrial Linux Solutions | http://www.pengutronix.de/ | > > Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |