Commit c7d47d51 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Sebastian Reichel

dt-bindings: power: supply: define monitored-battery in common place

Define the type of monitored-battery in power-supply.yaml common schema.
Reference the schema where applicable to enforce the above in bindings
which have monitored-battery property.
Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent eae063f6
...@@ -13,6 +13,8 @@ description: | ...@@ -13,6 +13,8 @@ description: |
maintainers: maintainers:
- Dmitry Osipenko <digetx@gmail.com> - Dmitry Osipenko <digetx@gmail.com>
$ref: /schemas/power/supply/power-supply.yaml
properties: properties:
compatible: compatible:
items: items:
...@@ -22,15 +24,13 @@ properties: ...@@ -22,15 +24,13 @@ properties:
reg: reg:
maxItems: 1 maxItems: 1
monitored-battery: true
power-supplies: true
system-power-controller: true system-power-controller: true
required: required:
- compatible - compatible
- reg - reg
additionalProperties: false unevaluatedProperties: false
examples: examples:
- | - |
......
...@@ -124,6 +124,8 @@ properties: ...@@ -124,6 +124,8 @@ properties:
The child node for the charger to hold additional properties. If a The child node for the charger to hold additional properties. If a
battery is not in use, this node can be omitted. battery is not in use, this node can be omitted.
type: object type: object
$ref: /schemas/power/supply/power-supply.yaml
properties: properties:
monitored-battery: monitored-battery:
description: | description: |
......
...@@ -60,13 +60,11 @@ properties: ...@@ -60,13 +60,11 @@ properties:
monitored-battery: monitored-battery:
description: | description: |
phandle of battery characteristics node.
The fuel gauge uses the following battery properties: The fuel gauge uses the following battery properties:
- energy-full-design-microwatt-hours - energy-full-design-microwatt-hours
- charge-full-design-microamp-hours - charge-full-design-microamp-hours
- voltage-min-design-microvolt - voltage-min-design-microvolt
Both or neither of the *-full-design-*-hours properties must be set. Both or neither of the *-full-design-*-hours properties must be set.
See Documentation/devicetree/bindings/power/supply/battery.yaml
power-supplies: true power-supplies: true
......
...@@ -10,6 +10,8 @@ title: Ingenic JZ47xx battery bindings ...@@ -10,6 +10,8 @@ title: Ingenic JZ47xx battery bindings
maintainers: maintainers:
- Artur Rojek <contact@artur-rojek.eu> - Artur Rojek <contact@artur-rojek.eu>
$ref: power-supply.yaml#
properties: properties:
compatible: compatible:
oneOf: oneOf:
...@@ -28,8 +30,6 @@ properties: ...@@ -28,8 +30,6 @@ properties:
monitored-battery: monitored-battery:
description: > description: >
phandle to a "simple-battery" compatible node.
This property must be a phandle to a node using the format described This property must be a phandle to a node using the format described
in battery.yaml, with the following properties being required: in battery.yaml, with the following properties being required:
- voltage-min-design-microvolt: drained battery voltage, - voltage-min-design-microvolt: drained battery voltage,
......
...@@ -18,4 +18,10 @@ properties: ...@@ -18,4 +18,10 @@ properties:
This property is added to a supply in order to list the devices which This property is added to a supply in order to list the devices which
supply it power, referenced by their phandles. supply it power, referenced by their phandles.
monitored-battery:
$ref: /schemas/types.yaml#/definitions/phandle
description:
The battery (with "simple-battery" compatible) being monitored by this
power supply.
additionalProperties: true additionalProperties: true
...@@ -18,6 +18,7 @@ description: | ...@@ -18,6 +18,7 @@ description: |
provides a Dual-source Battery Charger, two port BC1.2 detection and a provides a Dual-source Battery Charger, two port BC1.2 detection and a
Battery Monitor. Battery Monitor.
$ref: power-supply.yaml#
properties: properties:
compatible: compatible:
......
...@@ -28,7 +28,6 @@ properties: ...@@ -28,7 +28,6 @@ properties:
The charger uses the following battery properties The charger uses the following battery properties
- charge-term-current-microamp: current for charge termination phase. - charge-term-current-microamp: current for charge termination phase.
- constant-charge-voltage-max-microvolt: maximum constant input voltage. - constant-charge-voltage-max-microvolt: maximum constant input voltage.
See Documentation/devicetree/bindings/power/supply/battery.yaml
additionalProperties: false additionalProperties: false
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment