Skip to content

Commit dad980f

Browse files
committed
dt-bindings: power: supply: gpio-charger: convert to yaml
Convert the gpio-charger bindings from text format to new YAML based representation. Reviewed-by: Linus Walleij <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
1 parent 596f478 commit dad980f

File tree

2 files changed

+58
-31
lines changed

2 files changed

+58
-31
lines changed

Documentation/devicetree/bindings/power/supply/gpio-charger.txt

Lines changed: 0 additions & 31 deletions
This file was deleted.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/power/supply/gpio-charger.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: simple battery chargers only communicating through GPIOs
8+
9+
maintainers:
10+
- Sebastian Reichel <[email protected]>
11+
12+
description:
13+
This binding is for all chargers, which are working more or less
14+
autonomously, only providing some status GPIOs and possibly some
15+
GPIOs for limited control over the charging process.
16+
17+
properties:
18+
compatible:
19+
const: gpio-charger
20+
21+
charger-type:
22+
enum:
23+
- unknown
24+
- battery
25+
- ups
26+
- mains
27+
- usb-sdp # USB standard downstream port
28+
- usb-dcp # USB dedicated charging port
29+
- usb-cdp # USB charging downstream port
30+
- usb-aca # USB accessory charger adapter
31+
description:
32+
Type of the charger, e.g. "mains" for a wall charger.
33+
34+
gpios:
35+
maxItems: 1
36+
description: GPIO indicating the charger presence
37+
38+
charge-status-gpios:
39+
maxItems: 1
40+
description: GPIO indicating the charging status
41+
42+
required:
43+
- compatible
44+
- gpios
45+
46+
additionalProperties: false
47+
48+
examples:
49+
- |
50+
#include <dt-bindings/gpio/gpio.h>
51+
52+
charger {
53+
compatible = "gpio-charger";
54+
charger-type = "usb-sdp";
55+
56+
gpios = <&gpd 28 GPIO_ACTIVE_LOW>;
57+
charge-status-gpios = <&gpc 27 GPIO_ACTIVE_LOW>;
58+
};

0 commit comments

Comments
 (0)