]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
power: twl4030_charger: find associated phy by more reliable means.
authorNeilBrown <neilb@suse.de>
Sun, 22 Mar 2015 22:52:48 +0000 (09:52 +1100)
committerFelipe Balbi <balbi@ti.com>
Tue, 26 May 2015 15:44:06 +0000 (10:44 -0500)
commitf5e4edb8c888958a970b2d42c47d2871a1a4fcdf
tree52f6424eac196fe27c5b21f9f9ba88ae7024fcd3
parente842b84c8e7221c45c8dbd7de09185c6149e1cf9
power: twl4030_charger: find associated phy by more reliable means.

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>
Documentation/devicetree/bindings/power/twl-charger.txt
Documentation/devicetree/bindings/usb/twlxxxx-usb.txt
drivers/power/twl4030_charger.c