dt-bindings: power: supply: ab8500: Standard monitored-battery

Make monitored-battery the standard phandle to the battery we monitor
for the AB8500 charger components. We make the old "battery" phandle
deprecated, and the new one required so we detect and fix all users to
use the standard phandle name.

Cc: devicetree@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
Linus Walleij 2021-10-07 00:40:06 +02:00 committed by Sebastian Reichel
parent db6e436264
commit eb415571c7
4 changed files with 28 additions and 12 deletions

View File

@ -17,10 +17,14 @@ properties:
compatible: compatible:
const: stericsson,ab8500-btemp const: stericsson,ab8500-btemp
battery: monitored-battery:
$ref: /schemas/types.yaml#/definitions/phandle $ref: /schemas/types.yaml#/definitions/phandle
description: phandle to battery node description: phandle to battery node
battery:
$ref: /schemas/types.yaml#/definitions/phandle
deprecated: true
interrupts: interrupts:
maxItems: 5 maxItems: 5
@ -42,7 +46,7 @@ properties:
required: required:
- compatible - compatible
- battery - monitored-battery
- interrupts - interrupts
- interrupt-names - interrupt-names
- io-channels - io-channels
@ -56,7 +60,7 @@ examples:
pmic { pmic {
battery-temperature { battery-temperature {
compatible = "stericsson,ab8500-btemp"; compatible = "stericsson,ab8500-btemp";
battery = <&ab8500_battery>; monitored-battery = <&battery>;
interrupts = <20 IRQ_TYPE_LEVEL_HIGH>, interrupts = <20 IRQ_TYPE_LEVEL_HIGH>,
<80 IRQ_TYPE_LEVEL_HIGH>, <80 IRQ_TYPE_LEVEL_HIGH>,
<83 IRQ_TYPE_LEVEL_HIGH>, <83 IRQ_TYPE_LEVEL_HIGH>,

View File

@ -17,13 +17,17 @@ properties:
compatible: compatible:
const: stericsson,ab8500-chargalg const: stericsson,ab8500-chargalg
battery: monitored-battery:
$ref: /schemas/types.yaml#/definitions/phandle $ref: /schemas/types.yaml#/definitions/phandle
description: phandle to battery node description: phandle to battery node
battery:
$ref: /schemas/types.yaml#/definitions/phandle
deprecated: true
required: required:
- compatible - compatible
- battery - monitored-battery
additionalProperties: false additionalProperties: false
@ -32,6 +36,6 @@ examples:
pmic { pmic {
charging-algorithm { charging-algorithm {
compatible = "stericsson,ab8500-chargalg"; compatible = "stericsson,ab8500-chargalg";
battery = <&ab8500_battery>; monitored-battery = <&ab8500_battery>;
}; };
}; };

View File

@ -17,10 +17,14 @@ properties:
compatible: compatible:
const: stericsson,ab8500-charger const: stericsson,ab8500-charger
battery: monitored-battery:
$ref: /schemas/types.yaml#/definitions/phandle $ref: /schemas/types.yaml#/definitions/phandle
description: phandle to battery node description: phandle to battery node
battery:
$ref: /schemas/types.yaml#/definitions/phandle
deprecated: true
vddadc-supply: vddadc-supply:
description: Supply for USB and Main charger description: Supply for USB and Main charger
@ -66,7 +70,7 @@ properties:
required: required:
- compatible - compatible
- battery - monitored-battery
- vddadc-supply - vddadc-supply
- interrupts - interrupts
- interrupt-names - interrupt-names
@ -81,7 +85,7 @@ examples:
pmic { pmic {
charger { charger {
compatible = "stericsson,ab8500-charger"; compatible = "stericsson,ab8500-charger";
battery = <&ab8500_battery>; monitored-battery = <&battery>;
vddadc-supply = <&ab8500_ldo_tvout_reg>; vddadc-supply = <&ab8500_ldo_tvout_reg>;
interrupts = <10 IRQ_TYPE_LEVEL_HIGH>, interrupts = <10 IRQ_TYPE_LEVEL_HIGH>,
<11 IRQ_TYPE_LEVEL_HIGH>, <11 IRQ_TYPE_LEVEL_HIGH>,

View File

@ -17,10 +17,14 @@ properties:
compatible: compatible:
const: stericsson,ab8500-fg const: stericsson,ab8500-fg
battery: monitored-battery:
$ref: /schemas/types.yaml#/definitions/phandle $ref: /schemas/types.yaml#/definitions/phandle
description: phandle to battery node description: phandle to battery node
battery:
$ref: /schemas/types.yaml#/definitions/phandle
deprecated: true
interrupts: interrupts:
maxItems: 5 maxItems: 5
@ -41,7 +45,7 @@ properties:
required: required:
- compatible - compatible
- battery - monitored-battery
- interrupts - interrupts
- interrupt-names - interrupt-names
- io-channels - io-channels
@ -55,7 +59,7 @@ examples:
pmic { pmic {
fuel-gauge { fuel-gauge {
compatible = "stericsson,ab8500-fg"; compatible = "stericsson,ab8500-fg";
battery = <&ab8500_battery>; monitored-battery = <&battery>;
interrupts = <24 IRQ_TYPE_LEVEL_HIGH>, interrupts = <24 IRQ_TYPE_LEVEL_HIGH>,
<8 IRQ_TYPE_LEVEL_HIGH>, <8 IRQ_TYPE_LEVEL_HIGH>,
<28 IRQ_TYPE_LEVEL_HIGH>, <28 IRQ_TYPE_LEVEL_HIGH>,