linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regulator: dt-bindings: Convert fixed-regulator to json-schema
@ 2019-01-10 22:19 Rob Herring
  2019-01-14 12:01 ` Mark Brown
  2019-01-14 22:08 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Rob Herring @ 2019-01-10 22:19 UTC (permalink / raw)
  To: devicetree; +Cc: linux-kernel, Liam Girdwood, Mark Brown

Convert the fixed-regulator binding to DT schema format using
json-schema.

Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
---
 .../bindings/regulator/fixed-regulator.txt    | 35 ----------
 .../bindings/regulator/fixed-regulator.yaml   | 67 +++++++++++++++++++
 2 files changed, 67 insertions(+), 35 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/regulator/fixed-regulator.txt
 create mode 100644 Documentation/devicetree/bindings/regulator/fixed-regulator.yaml

diff --git a/Documentation/devicetree/bindings/regulator/fixed-regulator.txt b/Documentation/devicetree/bindings/regulator/fixed-regulator.txt
deleted file mode 100644
index 0c2a6c8a1536..000000000000
--- a/Documentation/devicetree/bindings/regulator/fixed-regulator.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-Fixed Voltage regulators
-
-Required properties:
-- compatible: Must be "regulator-fixed";
-- regulator-name: Defined in regulator.txt as optional, but required here.
-
-Optional properties:
-- gpio: gpio to use for enable control
-- startup-delay-us: startup time in microseconds
-- enable-active-high: Polarity of GPIO is Active high
-If this property is missing, the default assumed is Active low.
-- gpio-open-drain: GPIO is open drain type.
-  If this property is missing then default assumption is false.
--vin-supply: Input supply name.
-
-Any property defined as part of the core regulator
-binding, defined in regulator.txt, can also be used.
-However a fixed voltage regulator is expected to have the
-regulator-min-microvolt and regulator-max-microvolt
-to be the same.
-
-Example:
-
-	abc: fixedregulator@0 {
-		compatible = "regulator-fixed";
-		regulator-name = "fixed-supply";
-		regulator-min-microvolt = <1800000>;
-		regulator-max-microvolt = <1800000>;
-		gpio = <&gpio1 16 0>;
-		startup-delay-us = <70000>;
-		enable-active-high;
-		regulator-boot-on;
-		gpio-open-drain;
-		vin-supply = <&parent_reg>;
-	};
diff --git a/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml b/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml
new file mode 100644
index 000000000000..a7607b0baab7
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/fixed-regulator.yaml
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/fixed-regulator.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Fixed Voltage regulators
+
+maintainers:
+  - Liam Girdwood <lgirdwood@gmail.com>
+  - Mark Brown <broonie@kernel.org>
+
+description:
+  Any property defined as part of the core regulator binding, defined in
+  regulator.txt, can also be used. However a fixed voltage regulator is
+  expected to have the regulator-min-microvolt and regulator-max-microvolt
+  to be the same.
+
+properties:
+  compatible:
+    const: regulator-fixed
+
+  regulator-name: true
+
+  gpio:
+    description: gpio to use for enable control
+    maxItems: 1
+
+  startup-delay-us:
+    description: startup time in microseconds
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  enable-active-high:
+    description:
+      Polarity of GPIO is Active high. If this property is missing,
+      the default assumed is Active low.
+    type: boolean
+
+  gpio-open-drain:
+    description:
+      GPIO is open drain type. If this property is missing then default
+      assumption is false.
+    type: boolean
+
+  vin-supply:
+    description: Input supply phandle.
+    $ref: /schemas/types.yaml#/definitions/phandle
+
+required:
+  - compatible
+  - regulator-name
+
+examples:
+  - |
+    abc: fixedregulator@0 {
+      compatible = "regulator-fixed";
+      regulator-name = "fixed-supply";
+      regulator-min-microvolt = <1800000>;
+      regulator-max-microvolt = <1800000>;
+      gpio = <&gpio1 16 0>;
+      startup-delay-us = <70000>;
+      enable-active-high;
+      regulator-boot-on;
+      gpio-open-drain;
+      vin-supply = <&parent_reg>;
+    };
+...
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] regulator: dt-bindings: Convert fixed-regulator to json-schema
  2019-01-10 22:19 [PATCH] regulator: dt-bindings: Convert fixed-regulator to json-schema Rob Herring
@ 2019-01-14 12:01 ` Mark Brown
  2019-01-14 22:08 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2019-01-14 12:01 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree, linux-kernel, Liam Girdwood

[-- Attachment #1: Type: text/plain, Size: 246 bytes --]

On Thu, Jan 10, 2019 at 04:19:03PM -0600, Rob Herring wrote:
> Convert the fixed-regulator binding to DT schema format using
> json-schema.

This looks good but has collided with some other changes from Linus, can
you please respin against them?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] regulator: dt-bindings: Convert fixed-regulator to json-schema
  2019-01-10 22:19 [PATCH] regulator: dt-bindings: Convert fixed-regulator to json-schema Rob Herring
  2019-01-14 12:01 ` Mark Brown
@ 2019-01-14 22:08 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2019-01-14 22:08 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree, linux-kernel, Liam Girdwood

[-- Attachment #1: Type: text/plain, Size: 295 bytes --]

On Thu, Jan 10, 2019 at 04:19:03PM -0600, Rob Herring wrote:
> Convert the fixed-regulator binding to DT schema format using
> json-schema.

Actually I've had to drop the series this conflicted with since it broke
a bunch of platforms so I'll go ahead and apply this instead, no need to
respin!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-14 22:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-10 22:19 [PATCH] regulator: dt-bindings: Convert fixed-regulator to json-schema Rob Herring
2019-01-14 12:01 ` Mark Brown
2019-01-14 22:08 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).