Commit 6b82151c authored by Dima Zavin's avatar Dima Zavin
Browse files

usb: otg_id: add suspend/resume interface



It is possible that while one driver has already suspended,
another driver calls otg_id_notify() because it has not yet been
suspended. It would then be possible for the suspended driver's
detect callback to be called. This is undesirable.

Introduce new otg_id_suspend/otg_id_resume functions that
keep a suspended count, and if a notification happens while
someone is suspended, that notification is deferred until
all the drivers are resumed. If the notification happens before
the last driver is suspended, that suspend will be aborted
and once the final driver resumes through otg_id_resume, the
notification will be delivered.

Change-Id: I32fd32bec65e366e5f97a25c15255d94773b85b3
Signed-off-by: default avatarDima Zavin <dima@android.com>
parent f7d29b64
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment