2020-06-09 08:03:24

by Pi-Hsun Shih

[permalink] [raw]
Subject: [PATCH 1/2] dt-bindings: regulator: Add DT binding for cros-ec-regulator

Add DT binding documentation for cros-ec-regulator, a voltage regulator
controlled by ChromeOS EC.

Signed-off-by: Pi-Hsun Shih <[email protected]>
---
.../bindings/regulator/cros-ec-regulator.yaml | 39 +++++++++++++++++++
1 file changed, 39 insertions(+)
create mode 100644 Documentation/devicetree/bindings/regulator/cros-ec-regulator.yaml

diff --git a/Documentation/devicetree/bindings/regulator/cros-ec-regulator.yaml b/Documentation/devicetree/bindings/regulator/cros-ec-regulator.yaml
new file mode 100644
index 000000000000..1b6ba9a6cc91
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/cros-ec-regulator.yaml
@@ -0,0 +1,39 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/cros-ec-regulator.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ChromeOS EC controlled voltage regulators
+
+maintainers:
+ - Pi-Hsun Shih <[email protected]>
+
+description:
+ Any property defined as part of the core regulator binding, defined in
+ regulator.yaml, can also be used.
+
+allOf:
+ - $ref: "regulator.yaml#"
+
+properties:
+ compatible:
+ const: regulator-cros-ec
+
+ google,remote-regulator:
+ description: Identifier for the voltage regulator to ChromeOS EC.
+ $ref: "/schemas/types.yaml#/definitions/uint32"
+
+required:
+ - compatible
+ - google,remote-regulator
+
+examples:
+ - |
+ cros-ec-regulator {
+ compatible = "regulator-cros-ec";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ google,remote-regulator = <1>;
+ };
+...
--
2.27.0.278.ge193c7cf3a9-goog


2020-06-09 11:27:22

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: regulator: Add DT binding for cros-ec-regulator

On Tue, Jun 09, 2020 at 03:59:54PM +0800, Pi-Hsun Shih wrote:

> + google,remote-regulator:
> + description: Identifier for the voltage regulator to ChromeOS EC.
> + $ref: "/schemas/types.yaml#/definitions/uint32"

As I said in reviewing the patch this is a bit weird - it feels like it
should be a reg property on a bus rather than a property like this. How
exactly to these devices get created - can the core device for the EC
enumerate the regulators that are present?


Attachments:
(No filename) (490.00 B)
signature.asc (499.00 B)
Download all attachments