Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2281014pxb; Fri, 5 Mar 2021 11:33:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJzw1xGANzQr+1JAVLSRaA3N0dwtJn85OTQYiFt7g/xA/EMdAHVf3WsxarQ03IXxznU7UaM+ X-Received: by 2002:a17:907:7684:: with SMTP id jv4mr3920653ejc.231.1614972782487; Fri, 05 Mar 2021 11:33:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614972782; cv=none; d=google.com; s=arc-20160816; b=i0DRn4f0SXdjqUxYr87cuFo4inkUWKx56kwM9XUHfxu+NADajpk3xFslxVx8ZhLZbU Lw0s7T98CmhgxUnSvHkHTtl8/VqZZhPdZL5qwYPDEDS/lJPvzloE03YrTA9BPaN2rHBs PTFHvqGIDwEbaC+dBMthVsBTbX+J8ybmSaT9464czCWRn5kWNd3EVkM5iNjhjEhUo2HX D5uPigOYXxQTk+hn3ukv53NUZ6bflfyIeTiU/B/1AWgyoEXQresdxbu7YNPTWHYg8kL4 S3DZzClmlGRKxrgQGyz2Fk3WnvTkHD1pCJVETCU5ZDW3TmnCPevmqM3+tJgg3D+4uUjJ UkZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=l0zxLtovtFMmT2lNUt8ysKJIO/ypRqEiptzm/NiMSFQ=; b=xl76H5c/duSBoGfn7INxOtOjp3lqpFf2A/Mkos6V2lhC4PTQxO29zvyhlMjG0q++Qh sKA3Tb6SAF6FIWHPqP44ynaVfUIYVgRVO0JqGE0cW93lpxFBlPXFjtdyU1UQmX0QnoFL 8N0+XtabyzBsZslEs+viRaLxmFumntlkCP6hjgUcUGmcosMUG/DcY8jiHWfC0jgqRMnH WpRsYdUKCF1gGASu/TP/P3tXWvpa9LgyVPfJU4UsOM/df97HQhPy45tp46q5HQPrno9o VpdLTP4dHISrdSGTUx+fR8DFNN3jxJvTAMCkGV555LO8iA/a7oJzmihK71xMElQykMfk NkUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d22si1926797edu.604.2021.03.05.11.32.39; Fri, 05 Mar 2021 11:33:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229719AbhCETbE (ORCPT + 99 others); Fri, 5 Mar 2021 14:31:04 -0500 Received: from mail-oo1-f51.google.com ([209.85.161.51]:44717 "EHLO mail-oo1-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229882AbhCETat (ORCPT ); Fri, 5 Mar 2021 14:30:49 -0500 Received: by mail-oo1-f51.google.com with SMTP id n19so689460ooj.11; Fri, 05 Mar 2021 11:30:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=l0zxLtovtFMmT2lNUt8ysKJIO/ypRqEiptzm/NiMSFQ=; b=AgiRzHJpIzRcXhdMgJICJXUYvQCqnwR9JsPZVcUaT7GqmtZysLmcaoqK/jIxcV3i4y bwhz0MVZOYAyINFDUwT9iJ0F82Ve4pBzyo6wxsrLOk2a202XDA+86wo8M9Tkky5wOnP7 driMdHOKKQm1K0F9WKVW416eW/C68JMH1tf9fBFh4OIxj3AuikI/H0L/ymqQMc+s6uwA z/I6lViu+d4RfqWGJn+fNHe/A5r6koS0uQu1RNerzs65L8R3dhffQpcva1TOZoFkGYvm mI3wKVxcrqYjOPkcYo6yi+0HmLVGPKz4VCmTueWbzH1Q0v4sAFzFfyTMnD4hjfkL9t6s zF/A== X-Gm-Message-State: AOAM530fynt9U4HsXaR5UxtVTJDFit0UjJkb6a4Z8QZQqTLmTdCtFcs7 mKFXqfAqa6o75i6rnLRbwg== X-Received: by 2002:a4a:ac49:: with SMTP id q9mr8988525oon.73.1614972649122; Fri, 05 Mar 2021 11:30:49 -0800 (PST) Received: from robh.at.kernel.org (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id f29sm812537ots.22.2021.03.05.11.30.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 11:30:48 -0800 (PST) Received: (nullmailer pid 516963 invoked by uid 1000); Fri, 05 Mar 2021 19:30:47 -0000 Date: Fri, 5 Mar 2021 13:30:47 -0600 From: Rob Herring To: Matti Vaittinen Cc: mazziesaccount@gmail.com, Liam Girdwood , Mark Brown , Andy Gross , Bjorn Andersson , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-power@fi.rohmeurope.com, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org Subject: Re: [RFC PATCH 1/7] dt_bindings: Add protection limit properties Message-ID: <20210305193047.GA501479@robh.at.kernel.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 11, 2021 at 02:34:17PM +0200, Matti Vaittinen wrote: > Support specifying protection/error/warning limits for regulator > over current, over temperature and over/under voltage. > > Most of the PMICs support only "protection" feature but few > setups do also support error/warning level indications. > > On many ICs most of the protection limits can't actually be set. > But for example the ampere limit for over-current protection on ROHM > BD9576 can be configured - or feature can be completely disabled. > > Provide limit setting for all protections/errors for the sake of > the completeness and do that using own properties for all so that > not all users would need to set all levels when only one or few are > supported. > > Signed-off-by: Matti Vaittinen > --- > .../bindings/regulator/regulator.yaml | 82 +++++++++++++++++++ > 1 file changed, 82 insertions(+) > > diff --git a/Documentation/devicetree/bindings/regulator/regulator.yaml b/Documentation/devicetree/bindings/regulator/regulator.yaml > index 6d0bc9cd4040..47fff75f0554 100644 > --- a/Documentation/devicetree/bindings/regulator/regulator.yaml > +++ b/Documentation/devicetree/bindings/regulator/regulator.yaml > @@ -117,6 +117,88 @@ properties: > description: Enable over current protection. > type: boolean > > + regulator-over-current-protection-microamp: Kind of long and 'current' is implied by 'microamp'. Perhaps regulator-oc-protection-microamp and similar. > + description: Set over current protection limit. This is a limit where > + hardware performs emergency shutdown. Zero can be passed to disable > + protection and value '1' indicates that protection should be enabled but > + limit setting can be omitted. > + > + regulator-over-current-error-microamp: > + description: Set over current error limit. This is a limit where part of > + the hardware propably is malfunctional and damage prevention is requested. > + Zero can be passed to disable error detection and value '1' indicates > + that detection should be enabled but limit setting can be omitted. > + > + regulator-over-current-warn-microamp: > + description: Set over current warning limit. This is a limit where hardware > + is assumed still to be functional but approaching limit where it gets > + damaged. Recovery actions should be initiated. Zero can be passed to > + disable detection and value '1' indicates that detection should > + be enabled but limit setting can be omitted. > + > + regulator-over-voltage-protection-microvolt: > + description: Set over voltage protection limit. This is a limit where > + hardware performs emergency shutdown. Zero can be passed to disable > + protection and value '1' indicates that protection should be enabled but > + limit setting can be omitted. Limit is given as microvolt offset from > + voltage set to regulator. > + > + regulator-over-voltage-error-microvolt: > + description: Set over voltage error limit. This is a limit where part of > + the hardware propably is malfunctional and damage prevention is requested > + Zero can be passed to disable error detection and value '1' indicates > + that detection should be enabled but limit setting can be omitted. Limit > + is given as microvolt offset from voltage set to regulator. > + > + regulator-over-voltage-warn-microvolt: > + description: Set over voltage warning limit. This is a limit where hardware > + is assumed still to be functional but approaching limit where it gets > + damaged. Recovery actions should be initiated. Zero can be passed to > + disable detection and value '1' indicates that detection should > + be enabled but limit setting can be omitted. Limit is given as microvolt > + offset from voltage set to regulator. > + > + regulator-under-voltage-protection-microvolt: > + description: Set over under voltage protection limit. This is a limit where > + hardware performs emergency shutdown. Zero can be passed to disable > + protection and value '1' indicates that protection should be enabled but > + limit setting can be omitted. Limit is given as microvolt offset from > + voltage set to regulator. > + > + regulator-under-voltage-error-microvolt: > + description: Set under voltage error limit. This is a limit where part of > + the hardware propably is malfunctional and damage prevention is requested > + Zero can be passed to disable error detection and value '1' indicates > + that detection should be enabled but limit setting can be omitted. Limit > + is given as microvolt offset from voltage set to regulator. > + > + regulator-under-voltage-warn-microvolt: > + description: Set over under voltage warning limit. This is a limit where > + hardware is assumed still to be functional but approaching limit where > + it gets damaged. Recovery actions should be initiated. Zero can be passed > + to disable detection and value '1' indicates that detection should > + be enabled but limit setting can be omitted. Limit is given as microvolt > + offset from voltage set to regulator. > + > + regulator-over-temperature-protection-kelvin: > + description: Set over temperature protection limit. This is a limit where > + hardware performs emergency shutdown. Zero can be passed to disable > + protection and value '1' indicates that protection should be enabled but > + limit setting can be omitted. > + > + regulator-over-temperature-error-kelvin: > + description: Set over temperature error limit. This is a limit where part of > + the hardware propably is malfunctional and damage prevention is requested > + Zero can be passed to disable error detection and value '1' indicates > + that detection should be enabled but limit setting can be omitted. > + > + regulator-over-temperature-warn-kelvin: > + description: Set over temperature warning limit. This is a limit where > + hardware is assumed still to be functional but approaching limit where it > + gets damaged. Recovery actions should be initiated. Zero can be passed to > + disable detection and value '1' indicates that detection should > + be enabled but limit setting can be omitted. > + > regulator-active-discharge: > description: | > tristate, enable/disable active discharge of regulators. The values are: > -- > 2.25.4 > > > -- > Matti Vaittinen, Linux device drivers > ROHM Semiconductors, Finland SWDC > Kiviharjunlenkki 1E > 90220 OULU > FINLAND > > ~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~ > Simon says - in Latin please. > ~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~ > Thanks to Simon Glass for the translation =]