Commit cbbfc239 authored by mullerf's avatar mullerf Committed by jonerlin
Browse files

Fix dev_wake behavior and pm_runtime functions flow



dev_wake was not always de-asserted properly during short
resume/suspend cycles because of what was returned by
pm_runtime_active(dev). This led to dev_wake staying high, and
therefore preventing the BT chip from going to LPM.

The whole dev_wake flow now is controlled between device_resume and
device_suspend.

Modified the overall pm_runtime flow, so Tx are managed through
pm_runtime_get_sync() and pm_runtime_put_autosuspend().

Rx (through host_wake) are managed with pm_stay_awake() and
pm_wakeup_dev_event() only. Because adding pm_runtime_get() to there
leads to bad beahvior and pm_runtime getting out of sync.

Test: Made sure with logic analyser that dev_wake is de-asserted when
SoC goes to suspend after short cycles of resume/suspend. And also
that no BT crashes occurs after extended amoutn of time stress-testing
BT.

Bug: 187643267
Bug: 189057690

Signed-off-by: default avatarmullerf <mullerf@google.com>
Change-Id: Ib5b468d8fa5544dcb1f8ea9aac560bbbc22562f2

Signed-off-by: default avatarmullerf <mullerf@google.com>
Change-Id: Ib5b468d8fa5544dcb1f8ea9aac560bbbc22562f2
Signed-off-by: default avatarjonerlin <jonerlin@google.com>
parent 51fdb329
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment