Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754838AbbFLWKf (ORCPT ); Fri, 12 Jun 2015 18:10:35 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:55478 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752430AbbFLWKc (ORCPT ); Fri, 12 Jun 2015 18:10:32 -0400 Date: Fri, 12 Jun 2015 15:10:30 -0700 From: Stephen Boyd To: Rob Herring Cc: Mark Brown , "linux-kernel@vger.kernel.org" , linux-arm-msm , "linux-arm-kernel@lists.infradead.org" , David Collins , "devicetree@vger.kernel.org" Subject: Re: [PATCH v2 6/6] regulator: qcom-spmi: Add vendor specific configuration Message-ID: <20150612221030.GA7854@codeaurora.org> References: <1434069427-3642-1-git-send-email-sboyd@codeaurora.org> <1434069427-3642-7-git-send-email-sboyd@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3746 Lines: 89 On 06/11, Rob Herring wrote: > On Thu, Jun 11, 2015 at 7:37 PM, Stephen Boyd wrote: > > Add support for over current protection (OCP), pin control > > selection, soft start and soft start strength, auto-mode, input > > current limiting, and pull down. > > > > Cc: > > Signed-off-by: Stephen Boyd > > --- > > > > Changes from v1: > > * New patch split from original SPMI regulator driver > > > > .../bindings/regulator/qcom,spmi-regulator.txt | 62 +++++ > > drivers/regulator/qcom_spmi-regulator.c | 298 ++++++++++++++++++++- > > 2 files changed, 358 insertions(+), 2 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt > > index 75b4604bad07..ab01a152e930 100644 > > --- a/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt > > +++ b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt > > @@ -99,6 +99,68 @@ see regulator.txt - with additional custom properties described below: > > soft start are active all the time. 0 = Set initial mode to > > low power mode (LPM). > > > > +- qcom,auto-mode-enable: > > Auto regulator modes are fairly common. Can't we have a common property here? > > > + Usage: optional > > + Value type: > > This can be bool. Unless we want to have a mode property with "auto" > being one possible value. >From what I can tell we use this property as qcom,auto-mode-enable = <0>. Put another way, that's qcom,auto-mode-disable. Should we have two properties? Or is it better to mark all regulators explicitly with either auto-mode-enable or the absence of such a property? The bindings take an approach of giving all these "boolean" properties a 0 or 1 value so that the absence of the property indicates that we should use the default value in the hardware. > > > + Description: 1 = Enable automatic hardware selection of regulator > > + mode (HPM vs LPM); not available on boost type > > + regulators. 0 = Disable auto mode selection. > > + > > +- qcom,ocp-enable: > > + Usage: optional > > + Value type: > > + Description: 1 = Allow over current protection (OCP) to be enabled for > > + voltage switch type regulators so that they latch off > > + automatically when over current is detected. OCP is > > + enabled when in HPM or auto mode. 0 = Disable OCP. > > This seems common too. Ok. I'll make up another patch for this one. Perhaps call it regulator-over-current-protection? > > > + > > +- qcom,ocp-max-retries: > > + Usage: optional > > + Value type: > > + Description: Maximum number of times to try toggling a voltage switch > > + off and back on as a result of consecutive over current > > + events. > > + > > +- qcom,ocp-retry-delay: > > + Usage: optional > > + Value type: > > + Description: Time to delay in milliseconds between each voltage switch > > + toggle after an over current event takes place. > > These 2 are perhaps less common. I hope I don't have a device that does this. :) > :) -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/