mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
f5e4edb8c8
twl4030_charger currently finds the associated phy using usb_get_phy() which will return the first USB2 phy. If your platform has multiple such phys (as mine does), this is not reliable (and reliably fails on the GTA04). Change to use devm_usb_get_phy_by_node(), having found the node by looking for an appropriately named sibling in device-tree. This makes usb-charging dependent on correct device-tree configuration. Acked-By: Sebastian Reichel <sre@kernel.org> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
30 lines
905 B
Text
30 lines
905 B
Text
TWL BCI (Battery Charger Interface)
|
|
|
|
The battery charger needs to interact with the USB phy in order
|
|
to know when charging is permissible, and when there is a connection
|
|
or disconnection.
|
|
|
|
The choice of phy cannot be configured at a hardware level, so there
|
|
is no value in explicit configuration in device-tree. Rather
|
|
if there is a sibling of the BCI node which is compatible with
|
|
"ti,twl4030-usb", then that is used to determine when and how
|
|
use USB power for charging.
|
|
|
|
Required properties:
|
|
- compatible:
|
|
- "ti,twl4030-bci"
|
|
- interrupts: two interrupt lines from the TWL SIH (secondary
|
|
interrupt handler) - interrupts 9 and 2.
|
|
|
|
Optional properties:
|
|
- ti,bb-uvolt: microvolts for charging the backup battery.
|
|
- ti,bb-uamp: microamps for charging the backup battery.
|
|
|
|
Examples:
|
|
|
|
bci {
|
|
compatible = "ti,twl4030-bci";
|
|
interrupts = <9>, <2>;
|
|
ti,bb-uvolt = <3200000>;
|
|
ti,bb-uamp = <150>;
|
|
};
|