From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753435AbcEWHSN (ORCPT ); Mon, 23 May 2016 03:18:13 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:17499 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753085AbcEWHSK (ORCPT ); Mon, 23 May 2016 03:18:10 -0400 From: Henry Chen To: Mark Brown , Rob Herring , Matthias Brugger CC: Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Liam Girdwood , , , , , Henry Chen 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 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- 1.8.1.1.dirty