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

Skip to content
Commit cc54a032 authored by Manu Gautam's avatar Manu Gautam
Browse files

usb_bam: Fix BUG in HSIC remove making pm usage_count negative



Runtime PM usage count of HSIC device is also used by usb_bam
to allow/forbid HSIC entering LPM. HSIC is allowed to enter
LPM only when both PROD and CONS are released by usb_bam.
During initialization, usb_bam increments pm usage_count when
HSIC registers with it and vice versa it decrements the count
when HSIC is de-registered. But, if HSIC was already in LPM when
getting de-registered then usb_bam ends up making pm usage_count
-1 later on HSIC remove. Next time when HSIC is registered again
then pm usage count toggles between 0 and -1. Negative pm
usage_count results in failure to wake up HSIC using pm_runtim_get
on async_irq (remote wakeup) or any usb_bam triggers.

CRs-Fixed: 709563
Change-Id: I460e628dc704e45285e47b70dc8aaf5963555031
Signed-off-by: default avatarManu Gautam <mgautam@codeaurora.org>
parent 169417fe
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