ARM: tegra: add power-supplies link between battery and charger
authorRhyland Klein <rklein@nvidia.com>
Mon, 10 Jun 2013 21:26:42 +0000 (17:26 -0400)
committerStephen Warren <swarren@nvidia.com>
Wed, 12 Jun 2013 20:52:51 +0000 (14:52 -0600)
The power supply core now supports detecting linkages between batteries
and chargers through the use of the power-supplies property. Adding
this to the battery, the core will use the phandle list to find
the associated charger and pair them up. This facilitates notifications
from the charger to the battery when ac power is dissconnected
or connected for instance.

Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
arch/arm/boot/dts/tegra114-dalmore.dts

index cfeb0f5..b92922f 100644 (file)
                        battery-name = "battery";
                        sbs,i2c-retry-count = <2>;
                        sbs,poll-retry-count = <100>;
+                       power-supplies = <&charger>;
                };
        };
 
                        vsys-l1-supply = <&vdd_ac_bat_reg>;
                        vsys-l2-supply = <&vdd_ac_bat_reg>;
 
-                       charger {
+                       charger: charger {
                                compatible = "ti,tps65090-charger";
                                ti,enable-low-current-chrg;
                        };