dt-bindings: power: Convert power_supply text to yaml
authorDan Murphy <dmurphy@ti.com>
Fri, 1 May 2020 17:29:13 +0000 (12:29 -0500)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Sat, 2 May 2020 14:48:02 +0000 (16:48 +0200)
Convert the power_supply.txt to power-supply.yaml.
This conversion entailed fixing up the binding to being yaml and dt
checker compliant.

Added a note in the power_supply.txt to reference the power-supply.yaml

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Documentation/devicetree/bindings/power/supply/power-supply.yaml [new file with mode: 0644]
Documentation/devicetree/bindings/power/supply/power_supply.txt

diff --git a/Documentation/devicetree/bindings/power/supply/power-supply.yaml b/Documentation/devicetree/bindings/power/supply/power-supply.yaml
new file mode 100644 (file)
index 0000000..3bb02bb
--- /dev/null
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/power/supply/power-supply.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Power Supply Core Support
+
+maintainers:
+  - Sebastian Reichel <sre@kernel.org>
+
+properties:
+  power-supplies:
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+    description:
+      This property is added to a supply in order to list the devices which
+      supply it power, referenced by their phandles.
+
+examples:
+  - |
+    power {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      usb_charger:charger@e {
+        compatible = "some,usb-charger";
+        reg = <0xe>;
+      };
+
+      ac_charger:charger@c {
+        compatible = "some,ac-charger";
+        reg = <0xc>;
+      };
+
+      battery:battery@b {
+        compatible = "some,battery";
+        reg = <0xb>;
+        power-supplies = <&usb_charger>, <&ac_charger>;
+      };
+    };
index 8391bfa..d9693e0 100644 (file)
@@ -1,23 +1,2 @@
-Power Supply Core Support
-
-Optional Properties:
- - power-supplies : This property is added to a supply in order to list the
-   devices which supply it power, referenced by their phandles.
-
-Example:
-
-       usb-charger: power@e {
-               compatible = "some,usb-charger";
-               ...
-       };
-
-       ac-charger: power@c {
-               compatible = "some,ac-charger";
-               ...
-       };
-
-       battery@b {
-               compatible = "some,battery";
-               ...
-               power-supplies = <&usb-charger>, <&ac-charger>;
-       };
+This binding has been converted to yaml please see power-supply.yaml in this
+directory.