From patchwork Fri Jan 12 10:18:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunyan Zhang X-Patchwork-Id: 124265 Delivered-To: patch@linaro.org Received: by 10.80.140.226 with SMTP id r31csp1693935edr; Fri, 12 Jan 2018 02:19:01 -0800 (PST) X-Google-Smtp-Source: ACJfBovjeurrCDL8KBKIE9Pu5quHj1nBxRqbLranluH/Nt5SEylC210/+QEHLC3kuf+WiFBVueZf X-Received: by 10.101.92.203 with SMTP id b11mr19764941pgt.177.1515752341119; Fri, 12 Jan 2018 02:19:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515752341; cv=none; d=google.com; s=arc-20160816; b=omPi6klypcq2Uz5auDs5YxwS1VR3+PaJ5wZ+QvE9J74+BNJy+yssfeEWTJBEektw2l JzeJXiW85J7Tn2H65y5ptvtPR5rG/pK6q0wI/FHLw1UcuyHCTGv/OYnyOXWqKYKozxK9 gib/vUk7kd6pIaE/+ziuiFpJQkPBaAkM78UqW//qYmg+3gqLDv997OAhrPRbm8PULA7z p8bhTKRvNaCZnn3LeEOaqZaA+9lE3h4ht8F2fz9WJhuAXZtrmjmYEMYKtcFpeMPyvt3P rHrvVCDtBs2EYa/cqRdLNQLviQso3k3TopaqmPYo85jlAxdVpB00HODABbvxl9byMA+i yziA== 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=wGI3NY6lEkBWVz+shP0kW0I+AbBcxdYAtIiEirYKySE=; b=RiIEmx5j0KKjSssS72l7nJe1SoPDxhuK1EX+R2y+jUJKW81CIRfBBZ938ug7nMxSqg 2S6J4vn75CRiElPbsu1U9Cc+y+OpckWQyyrPKqJpAEJF1MSDXUZYPrm3SYtbLHExjYZc woEsqzH1gBkBmovAMUI2dlcYRQAW8JZODHK8wnDy7TUrRZnGSdkW5TlObFQAFeE/22DU v5thQbxW5Sf5Z34PXYCi0fVaDTdWtvf/oaKi6jOtmfJD0BAm+xaevQ2dktLt9EL+Ic4z nK1AV1V2zixvSPK27X1uUtDwj+FakEtI0HL5TRKSRHnYBM2hxqTEGx/HIdR0t+LawLuW yZQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=A+VPRBAh; 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 h1si13416734pgs.693.2018.01.12.02.19.00; Fri, 12 Jan 2018 02:19:01 -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=A+VPRBAh; 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 S1754824AbeALKS6 (ORCPT + 28 others); Fri, 12 Jan 2018 05:18:58 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:34490 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754784AbeALKSz (ORCPT ); Fri, 12 Jan 2018 05:18:55 -0500 Received: by mail-pg0-f66.google.com with SMTP id j4so4307049pgp.1 for ; Fri, 12 Jan 2018 02:18:55 -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=wGI3NY6lEkBWVz+shP0kW0I+AbBcxdYAtIiEirYKySE=; b=A+VPRBAhoPQMPHYZ01XBT4Q16VivPgyVAbltdTsDHjDZnOJsYnleGe7nTmLphilACF Nldgm/F9EtTCeMJ6O3V7P2QitItNTfyA4IY2wmySuj0AH7N0+nZP0okq6LnfNLAugo+0 WPW5KazGGWFxXzIyLTznMT0ltfgenwZy3Njxs= 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=wGI3NY6lEkBWVz+shP0kW0I+AbBcxdYAtIiEirYKySE=; b=E1uK6PmpqqG4f6L740p5yh5fBWj7h/EVdvP/CXu5SvzqUMwO8jd/gaiw1DPK23WYEF i7Dqy8V+o4Emurk5C61NfT4vj85t/VlqhSL2vlR/nw4m+UDJHvF7dTtCic548M9n9HnM sxMRIY5uI3+d6fpAa5vRhYSKuw4pYiar8I5qOIUDNCYlwtEqa1HagozLoPbL8NzRP9aC 5GrNLX9bXCp/A/RgmmHOMeRtHbKig/eZCjUlbrE5/E0VvRqCY49j7Fwk8n5rYAVmZJ07 mbVIrHsCU1xAqW5C7q34cGHSU01cnLDYjqnA4xU2zyoyCR50RaevUwLF+2w2xLc9iygQ WMqg== X-Gm-Message-State: AKwxytf+xY6ok2geQYHu/RG1SkjGwZo0T2vBPa2H838oiaBLXr/gvShC oBpibMihy78MaL2BqqRMsks7sQ== X-Received: by 10.159.197.73 with SMTP id d9mr9118940plo.121.1515752334672; Fri, 12 Jan 2018 02:18:54 -0800 (PST) Received: from ubt.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id m22sm44692613pfg.120.2018.01.12.02.18.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Jan 2018 02:18:53 -0800 (PST) From: Chunyan Zhang To: Mark Brown , Rob Herring Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Ulf Hansson , Arnd Bergmann , Chunyan Zhang Subject: [PATCH v3 1/5] bindings: regulator: added support for suspend states Date: Fri, 12 Jan 2018 18:18:21 +0800 Message-Id: <1515752305-15907-2-git-send-email-zhang.chunyan@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515752305-15907-1-git-send-email-zhang.chunyan@linaro.org> References: <1515752305-15907-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 now 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