From patchwork Mon May 23 07:13:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henry Chen X-Patchwork-Id: 9131257 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B43B26075F for ; Mon, 23 May 2016 07:19:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A8AE5281FE for ; Mon, 23 May 2016 07:19:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9BB4528210; Mon, 23 May 2016 07:19:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 38D6D281FE for ; Mon, 23 May 2016 07:19:59 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b4k8I-0001CI-6A; Mon, 23 May 2016 07:18:34 +0000 Received: from [210.61.82.184] (helo=mailgw02.mediatek.com) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b4k8E-00019z-9m; Mon, 23 May 2016 07:18:31 +0000 Received: from mtkhts09.mediatek.inc [(172.21.101.70)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 255259003; Mon, 23 May 2016 15:18:06 +0800 Received: from mtkslt205.mediatek.inc (10.21.15.75) by mtkhts09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 14.3.266.1; Mon, 23 May 2016 15:18:05 +0800 From: Henry Chen To: Mark Brown , Rob Herring , Matthias Brugger Subject: [PATCH v2 1/3] regulator: DT: Add DT property for operation mode configuration Date: Mon, 23 May 2016 15:13:29 +0800 Message-ID: <1463987611-32139-2-git-send-email-henryc.chen@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1463987611-32139-1-git-send-email-henryc.chen@mediatek.com> References: <1463987611-32139-1-git-send-email-henryc.chen@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160523_001830_519045_D52478B1 X-CRM114-Status: GOOD ( 14.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Pawel Moll , Ian Campbell , Liam Girdwood , Henry Chen , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, Kumar Gala , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Some regulators support their operating mode to be changed by consumers for module specific purpose. Add a DT property to support this. Signed-off-by: Henry Chen --- Documentation/devicetree/bindings/regulator/regulator.txt | 5 +++++ include/dt-bindings/regulator/regulator.h | 14 ++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 include/dt-bindings/regulator/regulator.h diff --git a/Documentation/devicetree/bindings/regulator/regulator.txt b/Documentation/devicetree/bindings/regulator/regulator.txt index ecfc593..e505d0b 100644 --- a/Documentation/devicetree/bindings/regulator/regulator.txt +++ b/Documentation/devicetree/bindings/regulator/regulator.txt @@ -49,6 +49,11 @@ Optional properties: 0: Disable active discharge. 1: Enable active discharge. Absence of this property will leave configuration to default. +- regulator-supported-modes: Regulators can run in a variety of different + operating modes depending on output load. This allows further system power + savings by selecting the best (and most efficient) regulator mode for a + desired load. The definition for each of these operation is defined at + include/dt-bindings/regulator/regulator.h Deprecated properties: - regulator-compatible: If a regulator chip contains multiple diff --git a/include/dt-bindings/regulator/regulator.h b/include/dt-bindings/regulator/regulator.h new file mode 100644 index 0000000..2ed1dfd --- /dev/null +++ b/include/dt-bindings/regulator/regulator.h @@ -0,0 +1,14 @@ +/* + * This header provides constants for binding regulator. + */ + +#ifndef _DT_BINDINGS_REGULATOR_REGULATOR_H +#define _DT_BINDINGS_REGULATOR_REGULATOR_H + +/* Regulator operating modes */ +#define REGULATOR_OPERATION_MODE_FAST 0x0 +#define REGULATOR_OPERATION_MODE_NORMAL 0x1 +#define REGULATOR_OPERATION_MODE_IDLE 0x2 +#define REGULATOR_OPERATION_MODE_STANDBY 0x3 + +#endif