Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1c02cc8e authored by Pratham Pratap's avatar Pratham Pratap
Browse files

usb: phy: Reset PHY while disabling dpdm regulator



Currently PHY driver relies on regulators(vdd, 1p8, 3p1) to be
disabled for the PHY to come out of high-Z state when charger
driver is done with APSD. This works for the platforms having
single instance of PHY.

Consider a case where there are two instances of the same phy
(primary and secondary) and both are sharing the same resources
(regulators - vdd, 1p8, 3p1). If the platform is configured in
such a way that the secondary instance is always powered on
(e.g. host mode) and booted up with charger(DCP) connected on
the primary port, when charger is disconnected after bootup,
dpdm_regulator_disable will be called from charger driver which
will disable regulator but the regulators will not be disabled
since the secondary instance still has vote for regulators.
This will lead the primary instance to be in high-Z state even
though nothing is connected and causes extra power consumption.

Fix this by resetting the phy before turning off the regulators
in dpdm_regulator_disable for snps/qusb phys.

Change-Id: If96a878448144e446d12acf136c9c6d8fa9432cb
Signed-off-by: default avatarPratham Pratap <prathampratap@codeaurora.org>
parent 3de27838
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment