Skip to content

Commit 805f64e

Browse files
committed
dt-bindings: power: sbs-battery: Convert to yaml
Convert sbs-battery bindings to YAML. Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
1 parent 68956db commit 805f64e

File tree

2 files changed

+83
-30
lines changed

2 files changed

+83
-30
lines changed
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/power/supply/sbs,sbs-battery.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: SBS compliant battery
8+
9+
maintainers:
10+
- Sebastian Reichel <[email protected]>
11+
12+
description: |
13+
Battery compatible with the smart battery system specifications
14+
15+
properties:
16+
17+
compatible:
18+
oneOf:
19+
- items:
20+
- enum:
21+
- ti,bq20z65
22+
- ti,bq20z75
23+
- enum:
24+
- sbs,sbs-battery
25+
- items:
26+
- const: sbs,sbs-battery
27+
28+
reg:
29+
maxItems: 1
30+
31+
sbs,i2c-retry-count:
32+
description:
33+
The number of times to retry I2C transactions on I2C IO failure.
34+
default: 0
35+
allOf:
36+
- $ref: /schemas/types.yaml#/definitions/uint32
37+
38+
sbs,poll-retry-count:
39+
description:
40+
The number of times to try looking for new status after an external
41+
change notification.
42+
default: 0
43+
allOf:
44+
- $ref: /schemas/types.yaml#/definitions/uint32
45+
46+
sbs,battery-detect-gpios:
47+
description:
48+
GPIO which signals battery detection. If this is not supplied, the bus
49+
needs to be polled to detect the battery.
50+
maxItems: 1
51+
52+
sbs,disable-charger-broadcasts:
53+
description:
54+
SBS batteries by default send broadcast messages to SBS compliant chargers to
55+
configure max. charge current/voltage. If your hardware does not have an SBS
56+
compliant charger it should be disabled via this property to avoid blocking
57+
the bus. Also some SBS battery fuel gauges are known to have a buggy multi-
58+
master implementation.
59+
type: boolean
60+
61+
required:
62+
- compatible
63+
- reg
64+
65+
additionalProperties: false
66+
67+
examples:
68+
- |
69+
#include <dt-bindings/gpio/gpio.h>
70+
71+
i2c {
72+
#address-cells = <1>;
73+
#size-cells = <0>;
74+
75+
battery@b {
76+
compatible = "ti,bq20z75", "sbs,sbs-battery";
77+
reg = <0xb>;
78+
sbs,i2c-retry-count = <2>;
79+
sbs,poll-retry-count = <10>;
80+
sbs,battery-detect-gpios = <&gpio 122 GPIO_ACTIVE_HIGH>;
81+
sbs,disable-charger-broadcasts;
82+
};
83+
};

Documentation/devicetree/bindings/power/supply/sbs_sbs-battery.txt

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)