linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: regulator: Convert mp886x to json-schema
@ 2020-08-27  7:06 Jisheng Zhang
  2020-09-09 17:18 ` Rob Herring
  2020-09-10 12:51 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Jisheng Zhang @ 2020-08-27  7:06 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, linux-kernel, devicetree

Convert the mp886x binding to DT schema format using json-schema.

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
---
 .../devicetree/bindings/regulator/mp886x.txt  | 31 ----------
 .../bindings/regulator/mps,mp886x.yaml        | 61 +++++++++++++++++++
 2 files changed, 61 insertions(+), 31 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/regulator/mp886x.txt
 create mode 100644 Documentation/devicetree/bindings/regulator/mps,mp886x.yaml

diff --git a/Documentation/devicetree/bindings/regulator/mp886x.txt b/Documentation/devicetree/bindings/regulator/mp886x.txt
deleted file mode 100644
index b05307bbb0d9..000000000000
--- a/Documentation/devicetree/bindings/regulator/mp886x.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-Monolithic Power Systems MP8867/MP8869 voltage regulator
-
-Required properties:
-- compatible: Must be one of the following.
-	"mps,mp8867"
-	"mps,mp8869"
-- reg: I2C slave address.
-- enable-gpios: enable gpios.
-- mps,fb-voltage-divider: An array of two integers containing the resistor
-  values R1 and R2 of the feedback voltage divider in kilo ohms.
-
-Optional properties:
-- mps,switch-frequency-hz: The valid switch frequency in Hertz. Available values
-  are: 500000, 750000, 1000000, 1250000, 1500000
-
-Any property defined as part of the core regulator binding, defined in
-./regulator.txt, can also be used.
-
-Example:
-
-	vcpu: regulator@62 {
-		compatible = "mps,mp8869";
-		regulator-name = "vcpu";
-		regulator-min-microvolt = <700000>;
-		regulator-max-microvolt = <850000>;
-		regulator-always-on;
-		regulator-boot-on;
-		enable-gpios = <&porta 1 GPIO_ACTIVE_LOW>;
-		mps,fb-voltage-divider = <80 240>;
-		reg = <0x62>;
-	};
diff --git a/Documentation/devicetree/bindings/regulator/mps,mp886x.yaml b/Documentation/devicetree/bindings/regulator/mps,mp886x.yaml
new file mode 100644
index 000000000000..ba175b30f468
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/mps,mp886x.yaml
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/mps,mp886x.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Monolithic Power Systems MP8867/MP8869 voltage regulator
+
+maintainers:
+  - Jisheng Zhang <jszhang@kernel.org>
+
+allOf:
+  - $ref: regulator.yaml#
+
+properties:
+  compatible:
+    enum:
+      - mps,mp8867
+      - mps,mp8869
+
+  reg:
+    maxItems: 1
+
+  enable-gpios:
+    description: GPIO to enable/disable the regulator.
+    maxItems: 1
+
+  mps,fb-voltage-divider:
+    description: An array of two integers containing the resistor
+      values R1 and R2 of the feedback voltage divider in kilo ohms.
+    $ref: "/schemas/types.yaml#/definitions/uint32-array"
+    maxItems: 2
+
+  mps,switch-frequency-hz:
+    description: The valid switch frequency in Hertz.
+    enum: [500000, 750000, 1000000, 1250000, 1500000]
+
+required:
+  - compatible
+  - reg
+  - enable-gpios
+  - mps,fb-voltage-divider
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        regulator@62 {
+          compatible = "mps,mp8869";
+          regulator-name = "vcpu";
+          regulator-min-microvolt = <800000>;
+          regulator-max-microvolt = <1150000>;
+          enable-gpios = <&porta 1 GPIO_ACTIVE_LOW>;
+          mps,fb-voltage-divider = <80 240>;
+          reg = <0x62>;
+        };
+    };
+
+...
-- 
2.28.0


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

* Re: [PATCH] dt-bindings: regulator: Convert mp886x to json-schema
  2020-08-27  7:06 [PATCH] dt-bindings: regulator: Convert mp886x to json-schema Jisheng Zhang
@ 2020-09-09 17:18 ` Rob Herring
  2020-09-10 12:51 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2020-09-09 17:18 UTC (permalink / raw)
  To: Jisheng Zhang
  Cc: Liam Girdwood, linux-kernel, Mark Brown, Rob Herring, devicetree

On Thu, 27 Aug 2020 15:06:40 +0800, Jisheng Zhang wrote:
> Convert the mp886x binding to DT schema format using json-schema.
> 
> Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
> ---
>  .../devicetree/bindings/regulator/mp886x.txt  | 31 ----------
>  .../bindings/regulator/mps,mp886x.yaml        | 61 +++++++++++++++++++
>  2 files changed, 61 insertions(+), 31 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/regulator/mp886x.txt
>  create mode 100644 Documentation/devicetree/bindings/regulator/mps,mp886x.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH] dt-bindings: regulator: Convert mp886x to json-schema
  2020-08-27  7:06 [PATCH] dt-bindings: regulator: Convert mp886x to json-schema Jisheng Zhang
  2020-09-09 17:18 ` Rob Herring
@ 2020-09-10 12:51 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2020-09-10 12:51 UTC (permalink / raw)
  To: devicetree, linux-kernel, Rob Herring, Liam Girdwood, Jisheng Zhang

On Thu, 27 Aug 2020 15:06:40 +0800, Jisheng Zhang wrote:
> Convert the mp886x binding to DT schema format using json-schema.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

Thanks!

[1/1] dt-bindings: regulator: Convert mp886x to json-schema
      commit: fd24adf887e490fd10a9a6bb9d76854e87c235f8

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

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

end of thread, other threads:[~2020-09-10 13:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27  7:06 [PATCH] dt-bindings: regulator: Convert mp886x to json-schema Jisheng Zhang
2020-09-09 17:18 ` Rob Herring
2020-09-10 12:51 ` 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).