From patchwork Thu Jan 4 07:22:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunyan Zhang X-Patchwork-Id: 123392 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp11108893qgn; Wed, 3 Jan 2018 23:23:46 -0800 (PST) X-Google-Smtp-Source: ACJfBosIP8jfO3xOihxO1Ua3URrjN6E/O4LkbABLpGiH7Yg08B4air3jFcwEQae8gGQ/POTTGO8D X-Received: by 10.99.165.25 with SMTP id n25mr3307617pgf.406.1515050626332; Wed, 03 Jan 2018 23:23:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515050626; cv=none; d=google.com; s=arc-20160816; b=MLmp3Dtc18Kv3rWfl87ia9fFwtXczFKxlgdcKMID4bNp6a3+1xqcNeOh5VfeceIUVB ejHs2qmp+OvlNHn5bVw4BrG+v7YVTcZo33T8kgr0Af/C/9gNeimYDl4pRlkCqj3zBfVP ODrBPdx0wbXmen2Aqm8cNMjsX3RX3h07a4lI2Qt8fCnyVfWp39Rp110CbpwnrbwUyExq QFPwzyAFNMYriipDsvdbnLnGK/d0MALeKJ/yGVo0XUrZCOamQbJdTi3iuI3xeSSIemn2 ioGY6Dih7BcuekUpjMueKRT45I2UHa7vNrx12ZEn0e9MomWNG8w6AKxEJ52CbmLK96uo FfIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=FrAzK6kKJcDH2tufRv2eoSQNGoRTOWjdJwbNYcSwwWY=; b=F8FCa9KdVwROnMq5Hv6vJD4Jk+slp8/qZfk/aVNGjkv1xZqYM8UF0CQaST7Dq3hvnV aY876YxS7Dp6UQfpIdS/m+j5cT5njDhEUeNtBEq8wOIS0vJlTNgiAtoTWZvuiEw9uiH7 xL84y1KYo1flXiS5m4VGAJ6W9YyVwLlXFqC8jgxyj+hYTA7z6KmhmzNjMvDN0gn5nRjx U97bGehKSjKQ/QBNxV3uZuz9YYcfD6BDmlLtcx+f6fbE3t+I5Vh+gDxaF1/gLCizCp8I OCtYyTs9leu+EoYeFaHuKuvvA9WfQLAAL/Mkny3IKCdt3liQBYAluf5+6Fex9J+h5pYT RKvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cSwed873; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q1si1922656plb.29.2018.01.03.23.23.46; Wed, 03 Jan 2018 23:23:46 -0800 (PST) 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; dkim=pass header.i=@linaro.org header.s=google header.b=cSwed873; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752104AbeADHXn (ORCPT + 28 others); Thu, 4 Jan 2018 02:23:43 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:36722 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751493AbeADHXl (ORCPT ); Thu, 4 Jan 2018 02:23:41 -0500 Received: by mail-pf0-f196.google.com with SMTP id p84so437693pfd.3 for ; Wed, 03 Jan 2018 23:23:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=FrAzK6kKJcDH2tufRv2eoSQNGoRTOWjdJwbNYcSwwWY=; b=cSwed873ri16n9dP2ovE+/YZnZs461ZhAzh4mp9xofwzNEyooUm3aJTtSlmnPm+HUT 39bURJQB8OZhhfhtHd+LBA4+MzBpDzn0kuyLPbpoyp2G121Xd1z883l6qRCoG+S8cxYZ BrYhU6gpcCB267/bdn9N+kMRsVwA+RQVVw5C0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=FrAzK6kKJcDH2tufRv2eoSQNGoRTOWjdJwbNYcSwwWY=; b=Na88iawNas+8Lob6VJxW3zYl8UcSFAxWsoW8cGjQtxZklHL6cwI9Mft0Z+Q04cHRws H8/xhilN6aVYrt+zAjlA9t6qm6YOLZ7RFpxr6cFqAQ/YYI1i8oZLhKZQFtgR3bTmGoJ9 71WyvF+RlnV51tfduFLrbR0tq0DbCWcTdcAG0YkzrabvVmGfXysFJ4HpVaPkIcC3F4Tk QrNA3XbZe0hoF68vaqonnJLFtvxjX3NGJjAYGcdjdgNHeFQYFUzvVQDGmUg8M5iLUU6Q IZh5J6ARulFxqv838ppa6A4YgN968KLCdyJzzjNYvoaIkG2RAPm0kFxiMUVktr6uWS/A uNdg== X-Gm-Message-State: AKGB3mK1XcauDnW5B6rFH1Ow6lJtrHLqR3Pe02Lcbn1Vw3e/CcmRvI5K LRM49je8nMErjx/KyTNSJG3tWg== X-Received: by 10.101.81.135 with SMTP id h7mr3401110pgq.422.1515050620987; Wed, 03 Jan 2018 23:23:40 -0800 (PST) Received: from ubt.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id s14sm6244456pfa.158.2018.01.03.23.23.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 03 Jan 2018 23:23:40 -0800 (PST) From: Chunyan Zhang To: Mark Brown , Rob Herring Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Ulf Hansson , Chunyan Zhang Subject: [PATCH V2 1/5] bindings: regulator: added support for suspend states Date: Thu, 4 Jan 2018 15:22:44 +0800 Message-Id: <1515050568-23876-2-git-send-email-zhang.chunyan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515050568-23876-1-git-send-email-zhang.chunyan@linaro.org> References: <1515050568-23876-1-git-send-email-zhang.chunyan@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some systems need to set regulators to specific states when they enter low power modes, especially around CPUs. There are many of these modes depending on the particular runtime state. Currently the regulator consumers are not granted permission to change suspend state of regulator devices, the constraints are configured at startup. In order to allow changes in a vlotage range, we need to add new properties for voltage range and a flag to give permission to change the suspend voltage and suspend on/off in suspend mode. Signed-off-by: Chunyan Zhang --- Documentation/devicetree/bindings/regulator/regulator.txt | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/Documentation/devicetree/bindings/regulator/regulator.txt b/Documentation/devicetree/bindings/regulator/regulator.txt index 378f6dc..532e286 100644 --- a/Documentation/devicetree/bindings/regulator/regulator.txt +++ b/Documentation/devicetree/bindings/regulator/regulator.txt @@ -42,8 +42,19 @@ Optional properties: - regulator-state-[mem/disk] node has following common properties: - regulator-on-in-suspend: regulator should be on in suspend state. - regulator-off-in-suspend: regulator should be off in suspend state. - - regulator-suspend-microvolt: regulator should be set to this voltage - in suspend. + - regulator-suspend-min-microvolt: minimum voltage may be set in + suspend state. + - regulator-suspend-max-microvolt: maximum voltage may be set in + suspend state. + - regulator-suspend-microvolt: the default voltage which regulator + would be set in suspend. The voltage for suspend also can be + adjusted among {regulator-suspend-min-microvolt, + regulator-suspend-max-microvolt} by calling + regulator_set_suspend_voltage(). This property is not deprecated, + setting voltage for suspend mode via API the regulator driver + provides is recommended. + - regulator-changeable-in-suspend: whether the default voltage and + the regulator on/off in suspend can be changed in runtime. - regulator-mode: operating mode in the given suspend state. The set of possible operating modes depends on the capabilities of every hardware so the valid modes are documented on each regulator