[PATCH v2 1/3] dt-bindings: power/supply: Document generic USB charger

From: Paul Cercueil
Date: Wed Dec 11 2019 - 10:51:31 EST


Add documentation about the devicetree bindings for the generic USB
charger.

Signed-off-by: Paul Cercueil <paul@xxxxxxxxxxxxxxx>
---

Notes:
v2: Convert to YAML

.../bindings/power/supply/usb-charger.yaml | 41 +++++++++++++++++++
1 file changed, 41 insertions(+)
create mode 100644 Documentation/devicetree/bindings/power/supply/usb-charger.yaml

diff --git a/Documentation/devicetree/bindings/power/supply/usb-charger.yaml b/Documentation/devicetree/bindings/power/supply/usb-charger.yaml
new file mode 100644
index 000000000000..dcd705df6e73
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/supply/usb-charger.yaml
@@ -0,0 +1,41 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/supply/usb-charger.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Generic USB charger driver bindings
+
+maintainers:
+ - Paul Cercueil <paul@xxxxxxxxxxxxxxx>
+
+description: |
+ Devicetree bindings for a generic USB charger.
+
+ The node should be either a child of a USB node, or connect to the USB
+ node through the graph. The USB node must have the usb-role-switch property
+ set. The USB charger will report as online when the USB role is set to device,
+ and offline otherwise.
+
+properties:
+ compatible:
+ const: usb-charger
+
+ port: true
+
+required:
+ - compatible
+
+additionalProperties: false
+
+examples:
+ - |+
+ usb_charger: usb-charger {
+ compatible = "usb-charger";
+
+ port {
+ usb_charger_ep: endpoint {
+ remote-endpoint = <&usb_otg>;
+ };
+ };
+ };
--
2.24.0