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

Commit e8ec1217 authored by Manu Gautam's avatar Manu Gautam
Browse files

USB: PHY: msm: Improve power management handling for OTG



Driver currently performs runtime-pm usage_count update only once
as part of pm_runtime_resume. This allows driver to invoke
pm_runtime_resume as many times without pm usage_count going
beyond '1'. As these calls are not ref counted, for suspend
driver uses pm_runtime_put_noidle API when it figures out that all
LPM conditions are met. The _put_noidle API also ensures that
pm usage count would never be '-1'. This works fine as long as
only PHY driver is controlling runtime PM states of the device,
but this design starts giving problems when PM core also performs
_get/_put around system wide PM suspend/resume transitions of device.
And it also makes it impossible to define children of PHY devices
which can use runtime PM APIs to manage their devices' power states.
To simplify this, change runtime PM design to fix these issues
and also define UDC and EHCI devices as children of PHY driver.
This also allows cleaning up various hacks which are now redundant
due to this design change.

Change-Id: Ifee2f411d7192000395fea6fad15c640b9684e3f
Signed-off-by: default avatarManu Gautam <mgautam@codeaurora.org>
parent 66c068c9
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