diff mbox

[4/4] arm: tegra: Add power-supplies link between battery and charger

Message ID 1370899602-22123-5-git-send-email-rklein@nvidia.com
State Accepted, archived
Headers show

Commit Message

Rhyland Klein June 10, 2013, 9:26 p.m. UTC
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>
---
 arch/arm/boot/dts/tegra114-dalmore.dts |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Stephen Warren June 12, 2013, 5:44 p.m. UTC | #1
On 06/10/2013 03:26 PM, Rhyland Klein wrote:
> 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.

Rhyland, if I apply this patch without patches 1-3 being in the same
branch, will it cause any bugs? If so, I guess 1-3 should go through the
drivers/power maintainer for 3.11, and I should defer this patch to 3.12?
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rhyland Klein June 12, 2013, 5:46 p.m. UTC | #2
On 6/12/2013 1:44 PM, Stephen Warren wrote:
> On 06/10/2013 03:26 PM, Rhyland Klein wrote:
>> 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.
> 
> Rhyland, if I apply this patch without patches 1-3 being in the same
> branch, will it cause any bugs? If so, I guess 1-3 should go through the
> drivers/power maintainer for 3.11, and I should defer this patch to 3.12?
> 

No, this alone shouldn't cause a problem. Patches 2 & 3 enable the
support for using the power-supplies property in the charger and battery
drivers. Without them, this property will just be ignored for now.

--rhyland
Stephen Warren June 12, 2013, 9:32 p.m. UTC | #3
On 06/10/2013 03:26 PM, Rhyland Klein wrote:
> 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.

Applied to Tegra's for-3.11/dt branch.
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts b/arch/arm/boot/dts/tegra114-dalmore.dts
index cfeb0f5..b92922f 100644
--- a/arch/arm/boot/dts/tegra114-dalmore.dts
+++ b/arch/arm/boot/dts/tegra114-dalmore.dts
@@ -727,6 +727,7 @@ 
 			battery-name = "battery";
 			sbs,i2c-retry-count = <2>;
 			sbs,poll-retry-count = <100>;
+			power-supplies = <&charger>;
 		};
 	};
 
@@ -763,7 +764,7 @@ 
 			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;
 			};