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

Skip to content
Commit 24ecfd64 authored by Ajay Agarwal's avatar Ajay Agarwal Committed by Gerrit - the friendly Code Review server
Browse files

gpio: usbdetect: Avoid threaded IRQ handling if no change in ID



It is observed that the hard ID IRQ is enabled when the
threaded IRQ handler for the same is still running. In that
case, there are two issues. The ID LOW IRQ can come
consecutively which will increase the disable count of
vbus_irq. Then ID HIGH IRQ will not enable the vbus_irq and
peripheral mode detection will not work anymore. The second
issue is that ID HIGH IRQ is fired just before ID LOW IRQ.
This will mark usb->id_state from HIGH to LOW even while
threaded IRQ is running which will lead to host not getting
stopped and peripheral mode not working.

Fix both issues by maintaning a local copy of ID IRQ in
threaded IRQ handler and comparing it with previous ID state.
If same, then bail out.

Change-Id: If5da1f91ece9d1751d7002e64bab0e145623a92e
Signed-off-by: default avatarAjay Agarwal <ajaya@codeaurora.org>
parent 8ed108c9
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