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:
Manu Gautam <mgautam@codeaurora.org>
Loading
Please register or sign in to comment