On Wed, Mar 11, 2020 at 10:30:42AM +0100, Tobias Schramm wrote: > This patch adds the dts binding schema for the cw2015 fuel gauge. > > Signed-off-by: Tobias Schramm <t.schramm@xxxxxxxxxxx> > --- > .../bindings/power/supply/cw2015_battery.yaml | 83 +++++++++++++++++++ > 1 file changed, 83 insertions(+) > create mode 100644 Documentation/devicetree/bindings/power/supply/cw2015_battery.yaml > > diff --git a/Documentation/devicetree/bindings/power/supply/cw2015_battery.yaml b/Documentation/devicetree/bindings/power/supply/cw2015_battery.yaml > new file mode 100644 > index 000000000000..647dbc6e136e > --- /dev/null > +++ b/Documentation/devicetree/bindings/power/supply/cw2015_battery.yaml > @@ -0,0 +1,83 @@ > +# SPDX-License-Identifier: GPL-2.0 > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/power/supply/cw2015_battery.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Battery driver for CW2015 shuntless fule gauge by CellWise. s/fule/fuel/ > + > +maintainers: > + - Tobias Schramm <t.schramm@xxxxxxxxxxx> > + > +description: | > + The driver can utilize information from a simple-battery linked via a > + phandle in monitored-battery. If specified the driver uses the > + charge-full-design-microamp-hours property of the battery. > + > +properties: > + compatible: > + const: cellwise,cw2015 > + > + reg: > + items: > + - description: i2c address > + > + cellwise,battery-profile: > + description: | > + This property specifies characteristics of the battery used. The format > + of this binary blob is kept secret by CellWise. The only way to obtain > + it is to mail two batteries to a test facility of CellWise and receive > + back a test report with the binary blob. > + allOf: > + - $ref: /schemas/types.yaml#definitions/uint8-array > + items: > + - minItems: 64 > + maxItems: 64 > + > + cellwise,monitor-interval-ms: > + description: > + Specifies the interval in milliseconds gauge values are polled at > + $ref: /schemas/types.yaml#/definitions/uint32 > + > + power-supplies: > + description: > + Specifies supplies used for charging the battery connected to this gauge > + allOf: > + - $ref: /schemas/types.yaml#/definitions/phandle-array > + - minItems: 1 > + maxItems: 8 # Should be enough Is it necessary to set a maximum? power_supply.txt is still a text file but there is no mention of a maximum there. Daniel.