From: Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>
To: Lee Jones <lee@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Guru Das Srinagesh <linux@gurudas.dev>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, mfd@lists.linux.dev,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
Dhruvin Rajpura <drajpura@qti.qualcomm.com>,
Nihal Kumar Gupta <nihal.gupta@oss.qualcomm.com>,
Kamal Wadhwa <kamal.wadhwa@oss.qualcomm.com>,
Oleg Keri <okerixx@gmail.com>,
Burke Cates <burke.cates@gmail.com>,
Christian Cortner <ccortner@gmail.com>,
Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>
Subject: [PATCH v6 3/8] dt-bindings: mfd: pm8008: Add mode constants for PM8010 regulators
Date: Fri, 04 Dec 2026 11:20:04 +0530 [thread overview]
Message-ID: <20261204-pm8010_i2c_support-v6-3-55c4146e1bd4@oss.qualcomm.com> (raw)
In-Reply-To: <20261204-pm8010_i2c_support-v6-0-55c4146e1bd4@oss.qualcomm.com>
Add macros for the raw mode values to be used by the PM8010
regulator-allowed-modes and regulator-initial-mode device tree
properties.
Also constrain the regulator-allowed-modes and regulator-initial-mode
properties in the qcom,pm8008 binding to the values of these new macros.
Mode voting is supported in HW only for LDO1 and LDO2 of PM8010, so add
constraints to reflect this too.
Signed-off-by: Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>
---
.../devicetree/bindings/mfd/qcom,pm8008.yaml | 33 +++++++++++++++++++++-
.../dt-bindings/regulator/qcom,pm8008-regulator.h | 19 +++++++++++++
2 files changed, 51 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml b/Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml
index 2701aa755f31..64d4e26d16fa 100644
--- a/Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml
+++ b/Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml
@@ -82,11 +82,42 @@ properties:
type: object
additionalProperties: false
patternProperties:
- "^ldo[1-7]$":
+ "^ldo[1-2]$":
type: object
$ref: /schemas/regulator/regulator.yaml#
+
+ properties:
+ regulator-allowed-modes:
+ items:
+ enum: [ 0, 1 ]
+ regulator-initial-mode:
+ enum: [ 0, 1 ]
+ unevaluatedProperties: false
+
+ "^ldo[3-7]$":
+ type: object
+ $ref: /schemas/regulator/regulator.yaml#
+
+ properties:
+ regulator-allowed-modes: false
+ regulator-initial-mode: false
unevaluatedProperties: false
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: qcom,pm8008
+ then:
+ properties:
+ regulators:
+ patternProperties:
+ "^ldo[1-2]$":
+ properties:
+ regulator-allowed-modes: false
+ regulator-initial-mode: false
+
required:
- compatible
- reg
diff --git a/include/dt-bindings/regulator/qcom,pm8008-regulator.h b/include/dt-bindings/regulator/qcom,pm8008-regulator.h
new file mode 100644
index 000000000000..26d5d5c427c9
--- /dev/null
+++ b/include/dt-bindings/regulator/qcom,pm8008-regulator.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
+/* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */
+
+#ifndef __QCOM_PM8008_REGULATOR_H
+#define __QCOM_PM8008_REGULATOR_H
+
+/*
+ * These constants may be used to specify modes for PM8010 regulator device
+ * tree properties.
+ *
+ * PM8010_REGULATOR_MODE_LPM: Low power mode in which a small load current
+ * is allowed.
+ * PM8010_REGULATOR_MODE_NPM: Normal power mode in which the full rated
+ * current of the LDO is allowed.
+ */
+#define PM8010_REGULATOR_MODE_LPM 0
+#define PM8010_REGULATOR_MODE_NPM 1
+
+#endif
--
2.43.0
next prev parent reply other threads:[~2026-12-04 5:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 5:50 [PATCH v6 0/8] mfd: qcom-pm8008: Add support for PM8010 over I2C Jishnu Prakash
2026-12-04 5:50 ` [PATCH v6 1/8] dt-bindings: mfd: pm8008: Add qcom,pm8010-i2c compatible Jishnu Prakash
2026-12-04 5:50 ` [PATCH v6 2/8] regulator: pm8008: Add PM8010 support Jishnu Prakash
2026-12-04 5:50 ` Jishnu Prakash [this message]
2026-12-04 5:50 ` [PATCH v6 4/8] regulator: pm8008: Add mode voting support for PM8010 Jishnu Prakash
2026-12-04 5:50 ` [PATCH v6 5/8] mfd: qcom-pm8008: Drop GPIO support Jishnu Prakash
2026-12-04 5:50 ` [PATCH v6 6/8] mfd: qcom-pm8008: Add PM8010 support Jishnu Prakash
2026-12-04 5:50 ` [PATCH v6 7/8] dt-bindings: mfd: pm8008: Make interrupts optional Jishnu Prakash
2026-12-04 5:50 ` [PATCH v6 8/8] mfd: qcom-pm8008: Tolerate missing interrupt Jishnu Prakash
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261204-pm8010_i2c_support-v6-3-55c4146e1bd4@oss.qualcomm.com \
--to=jishnu.prakash@oss.qualcomm.com \
--cc=broonie@kernel.org \
--cc=burke.cates@gmail.com \
--cc=ccortner@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=drajpura@qti.qualcomm.com \
--cc=kamal.wadhwa@oss.qualcomm.com \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@gurudas.dev \
--cc=mfd@lists.linux.dev \
--cc=nihal.gupta@oss.qualcomm.com \
--cc=okerixx@gmail.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®