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: 859722 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="A+VPRBAh"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zHzJd71Jtz9sNw for ; Fri, 12 Jan 2018 21:20:01 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754806AbeALKS6 (ORCPT ); Fri, 12 Jan 2018 05:18:58 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:43670 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754532AbeALKSz (ORCPT ); Fri, 12 Jan 2018 05:18:55 -0500 Received: by mail-pg0-f65.google.com with SMTP id f14so4270979pga.10 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=GGVUlmnipL6SseVUdeR33WT74ZcNNwD7D+1dNAqClkSdKxyhr8BCTXWHkyE14kYp7y pscCPlAo+02BOJSqEVvoyCsfLjvwOM+c8ceGTxuH5lQ3DS7ON80+NNmUiD41lFhTWl/l iANUMOj9/QeJ9V+svlCYdChS8VbF3U2NdfVCDyU1dn+J2FmLARQSedw1zc7rJL3boggW +a4m9abykiHwCNqm1sf4Fi8ygJUHoay6Sw/GeJ8DuuZu7UEG8fQIFgao+ufoAY4HarN1 Q2dtaEBAL6gKa0bZ3bwllccLuz3KlR/OyZbSqWIQuiPKcjeJ+FWAZwnR8MDhIarIuXd4 GFOw== X-Gm-Message-State: AKwxytcMn91F5OjiYYkWp+hbWk2u+MjKxlwOLw3jqGehIzssleAmiSj9 SpWo1y8fr9MMQBdPC0nvePU8CQ== X-Google-Smtp-Source: ACJfBotoqJlxnFlVOI6KhUp/kWJWNIyh+b25XqcgwjWgVyPDwpS1WblYoMD7rK1hC6VUL3vRlCZNBQ== 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: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@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(-) 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